Connector/MappingService/MappingService.php
private function query(Definition $definition, $adapterName)
    {
        $originQuery = $this->queryFactory->create(
            $adapterName,
            $definition->getObjectType(),
            QueryType::ALL
        );

        $objects = $this->serviceBus->handle($originQuery);

        if (empty($objects)) {
            $objects = [];
        }

        $result = [];
        foreach ($objects as $object) {
            if ($object->getType() !== $definition->getObjectType()) {
                continue;
            }

            $result[] = $object;
        }

        return $result;
    }
private function query(Definition $definition, $adapterName)
    {
        $originQuery = $this->queryFactory->create(
            $adapterName,
            $definition->getObjectType(),
            QueryType::ALL
        );

        $objects = $this->serviceBus->handle($originQuery);

        if (empty($objects)) {
            $objects = [];
        }

        $result = [];
        foreach ($objects as $object) {
            if ($object->getType() !== $definition->getObjectType()) {
                continue;
            }

            $result[] = $object;
        }

        return $result;
    }
@param Definition $definition
@param string     $adapterName

@return TransferObjectInterface[]