Jira issue originally created by user @beberlei:
In a Class Table Inheritance Scenario, when you select a field "c.name" on a dql alias c of a child entity, where the field is really "p.name" on the parent the DQL parser does not recognize this and does not change the sql table alias. Test-Case attached.
Comment created by @beberlei:
SELECT e.name FROM Doctrine\Tests\Models\Company\CompanyEmployee e
SELECT c0*.name AS name0, c1_.discr AS discr1 FROM company_employees c0_ INNER JOIN company_persons c1_ ON c0_.id = c1_.id LEFT JOIN company_managers c2_ ON c0_.id = c2*.id
But should be:
SELECT **c1_**.name AS name0, c1*.discr AS discr1 FROM company_employees c0_ INNER JOIN company_persons c1_ ON c0_.id = c1_.id LEFT JOIN company_managers c2_ ON c0_.id = c2*.id
Comment created by @guilhermeblanco:
Added DDC-331 to core and provided test case is no longer valid.
Closing this ticket and committing the test case to prevent a possible BC break in the future.
Issue was closed with resolution "Cannot Reproduce"
Imported 1 attachments from Jira into https://gist.github.com/881dd1939fd47b9d32c4