The entities in the joined association will be fetched as part of the query
result if the alias used for the joined association is placed in the select
expressions.
[php] $qb = $em->createQueryBuilder() ->select('u') ->from('User', 'u')
->innerJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');