[PR #1212] [DDC-3108] Fix regression where join aliases were no longer accessible in Criteria expressions #9268

Open
opened 2026-01-22 16:03:46 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1212

State: closed
Merged: No


The solution to issue DDC-2764 was to blanket prefix all the fields with the root alias. The result was then impossible to use fields from multiple FROM tables or a JOIN.

This patch injects all available aliases into the comparison, if a field uses one of the aliases it will pass without modification. If it is an unknown alias it will prefix the first rootAlias listed using the same functionality as the deprecated getRootAlias() function.

Also improves the ORDER BY on Criteria expressions, again introduced by [DDC-2764] using the above functionality, this was out of scope of bug [DDC-3108].

Added unit tests to test new functionality.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1212 **State:** closed **Merged:** No --- The solution to issue DDC-2764 was to blanket prefix all the fields with the root alias. The result was then impossible to use fields from multiple FROM tables or a JOIN. This patch injects all available aliases into the comparison, if a field uses one of the aliases it will pass without modification. If it is an unknown alias it will prefix the first rootAlias listed using the same functionality as the deprecated getRootAlias() function. Also improves the ORDER BY on Criteria expressions, again introduced by [DDC-2764] using the above functionality, this was out of scope of bug [DDC-3108]. Added unit tests to test new functionality.
admin added the pull-request label 2026-01-22 16:03:46 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9268