Affects Version/s: 1.2.2
Fix Version/s: 1.2.3
I have found another bug in Doctrine 1.2.2.
Subqueries are not working in select statements at the moment.
The reason for this is that this line (found in the parseSelect function of the class Doctrine_Query) :
Returns an unusable value when passed an $expression which is a subquery.
To fix this problem I have patched my version of the code to use an existing "$componentAlias" instead of the value that would be returned by this function when a subquery is encountered.
My code now reads:
I have not rigorously tested this patch yet but it has been working for me in what tests I have done so far.
I have posted several very large bugs into jira over the past few months and haven't heard back regarding them. This leads me to believe that the Doctrine team has moved on from Doctrine 1.2.2 and is focusing only on Doctrine 2 issues at this point. I still love version 1 and haven't had the heart (or the time) to migrate my code over to 2 yet. If this is the case then the job of patching bugs like the ones I have reported in 1.2.2 is probably up to us users at this point. As such I will post my patched version of Doctrine_Query in a comment to this bug (My patched version also fixes another bug I reported: