I\'m using Doctrine\'s querybuilder in Symfony2 to create a query to fetch entities.
My current code looks like this:
$repository = $this->getDoct
You can try this :
use Doctrine\ORM\Query\Expr;
->leftJoin('a.installations', 'i', Expr\Join::WITH, 'i.page = :page')
->setParameter('page', $page)
See function leftJoin in doc: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/query-builder.html#high-level-api-methods