[DC-1041] Using ->limit() in conjunction with many-to-many with mysql generates wrong SQL Created: 30/Nov/11 Updated: 30/Nov/11
|Reporter:||Evgeniy Afonichev||Assignee:||Guilherme Blanco|
Using ->limit() in conjunction with many-to-many relationships with mysql leads to strange SQL generated. The condition id IS NULL is added in such case which is not correct at all.
Here's example schema
And here's query which generates wrong SQL
Expected SQL generated:
Actual SQL generated:
Seems like here's code which causes the bug https://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Query.php#L1307