[DDC-1815] using aliases from select clause in having clause does not work Created: 08/May/12  Updated: 06/Oct/12  Resolved: 06/Oct/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: DQL
Affects Version/s: 2.2.2
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Bart van den Burg Assignee: Benjamin Eberlei
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

I have the following DQL:

SELECT e, count(s) AS shiftsTooLate FROM RAI\ShifterBundle\Entity\Worker e INNER JOIN e.person person LEFT JOIN e.shifts s 
WITH s.reasonTooLate IS NOT NULL LEFT JOIN e.person a96582 LEFT JOIN e.person a31040 LEFT JOIN e.person a49970 
LEFT JOIN e.pools a30107 LEFT JOIN e.person a12776 LEFT JOIN a12776.qualifications a78193 LEFT JOIN e.person a38925 
WHERE (e.blacklist = :f0) AND (e.haccpInstruction = :f1) AND (e.introductoryMaterial = :f2) GROUP BY e.id HAVING (shiftsTooLate = :f3) 
ORDER BY e.id ASC

When I try to execute this query, I get an undefined index error:

https://gist.github.com/139220fe4ef7097d05d5



 Comments   
Comment by Benjamin Eberlei [ 27/May/12 ]

can you execute the query without being wrapped into KNP Paginator?

Comment by Benjamin Eberlei [ 06/Oct/12 ]

No feedback given and executed in context of knp paginator, which probably is the source of the error.

Generated at Sun Dec 21 01:55:23 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.