[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
Environment:

Debian VM, MySQL, Zend-Framework


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

 Description   

See attachment for description.



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

Hi Xavier,

Could you past your entities and mappings please ?

Thanks

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 Wed Aug 20 08:56:05 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.