-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
DoctrineactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)
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.
Metadata
Metadata
Assignees
Labels
DoctrineactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)