[DC-962] Broken logic when doctrine translates limit's into subqueries, with joins. (with patch) Created: 02/Feb/11 Updated: 02/Feb/11
|Reporter:||Ben Davies||Assignee:||Jonathan H. Wage|
Problem exists when Doctrine formulates a subquery to perform a limit when a join in included.
The problem is that the where clause that doctrine creates for the subquery (the WHERE IN clause) is inserted as the first where clause.
with parameters be (1, 2, 3)
Doctrine will translate this to
Doctrine will duplicate the params (Doctrine_Query_Abstract:969) to (1, 2, 3, 1, 2, 3), but now they are in the wrong order completely.
The easy fix is to move the limit subquery to the LAST where clause, which would reuslt in a query like so:
Attached is a patch to fix this issue, along with a patch that fixes all unit tests referring to the old query format.
|Comment by Ben Davies [ 02/Feb/11 ]|
upping to blocker since this breaks very basic queries