mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Quote strategy not applied to foreign key columns #5503
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lemartin on GitHub (Apr 17, 2017).
Originally assigned to: @lcobucci on GitHub.
The quote strategy is not applied to foreign key columns used in one-to-one associations. When fetching the Address entity the column
user-idis not quoted.The tests do not cover this scenario, as they force partially loaded entities. Applying the patch below should yield a failing test case. The columns come from a collection called
targetToSourceKeyColumnswhere, if I understood correctly, all columns are stored that are used asAs far as I can tell, the problem is in
SqlWalker::walkSelectClause, where the foreign key columns are added to the list of select expressions.Patch for creating a test case, based on branch 2.5 (
48e8c02cb8):