Closed
Description
We had this "bug report":
$qb = $this->getEntityManager()->createQueryBuilder();
$qb
->select('DISTINCT b')
->from('TestBundle:EntityA', 'a')
->innerJoin('TestBundle:EntityB', 'b', Expr\Join::WITH, $qb->expr()->eq('a.key', 'b'))
->where(
$qb->expr()->eq('b.flag', ':flagValue')
)
->setParameter('flagValue', 1)
;
The problem here is that the select()
does not select from the from()
table, but the joined one. The documentation should clarify that the select()
should go to the from()
table only for entity fields.