Jira issue originally created by user ksafke:
See attachment for description.
Comment created by @FabioBatSilva:
Could you past your entities and mappings please ?
Comment created by @beberlei:
What version of Doctrine are you using? This sounds like a bug that was fixed some time ago
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.
Issue was closed with resolution "Invalid"