[DDC-2006] one2many to self inverts table aliasses and creates wrong db query Created: 31/Aug/12  Updated: 04/May/13  Resolved: 04/May/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Xavier Dekeyster Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None

Debian VM, MySQL, Zend-Framework

Attachments: PNG File Screen Shot 2012-08-31 at 14.31.21.png    


See attachment for description.

Comment by Fabio B. Silva [ 06/Apr/13 ]

Hi Xavier,

Could you past your entities and mappings please ?


Comment by Benjamin Eberlei [ 14/Apr/13 ]

What version of Doctrine are you using? This sounds like a bug that was fixed some time ago

Comment by Benjamin Eberlei [ 04/May/13 ]

The query is correct, "c.parentCategory c2" generates the right query as per your screenshot. Its just not the order of the queries that you want, Native SQL wil help you here.

Generated at Tue Sep 01 02:09:37 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.