public function loadExternal($query, $statement)
    {
        $external = $this->externalAssociations($query->getRepository());
        if (empty($external)) {
            return $statement;
        }

        $driver = $query->getConnection()->getDriver();
        list($collected, $statement) = $this->_collectKeys($external, $query, $statement);

        foreach ($external as $meta) {
            $contain = $meta->associations();
            $instance = $meta->instance();
            $config = $meta->getConfig();
            $alias = $instance->getSource()->getAlias();
            $path = $meta->aliasPath();

            $requiresKeys = $instance->requiresKeys($config);
            if ($requiresKeys && empty($collected[$path][$alias])) {
                continue;
            }

            $keys = isset($collected[$path][$alias]) ? $collected[$path][$alias] : null;
            $f = $instance->eagerLoader(
                $config + [
                    'query' => $query,
                    'contain' => $contain,
                    'keys' => $keys,
                    'nestKey' => $meta->aliasPath()
                ]
            );
            $statement = new CallbackStatement($statement, $driver, $f);
        }

        return $statement;
    }