public function __construct(ORM\AbstractQuery $query, QueryObject $queryObject = NULL, Queryable $repository = NULL)
{
$this->query = $query;
$this->queryObject = $queryObject;
$this->repository = $repository;
if ($this->query instanceof NativeQueryWrapper || $this->query instanceof ORM\NativeQuery) {
$this->fetchJoinCollection = FALSE;
}
}