Skip to content

12225 Fix hydration issue when using indexBy, SQL filter, and inheritance mapping#12373

Open
tomme87 wants to merge 6 commits intodoctrine:2.20.xfrom
tomme87:12225-fix-hydration-issue
Open

12225 Fix hydration issue when using indexBy, SQL filter, and inheritance mapping#12373
tomme87 wants to merge 6 commits intodoctrine:2.20.xfrom
tomme87:12225-fix-hydration-issue

Conversation

@tomme87
Copy link

@tomme87 tomme87 commented Feb 3, 2026

As discussed in #12225 we get an "Uncaught ErrorException: Undefined array key" error when using trying to initialize a one-to-many collection with indexBy on entity with inheritance mapping and is enabling/disabling SQL filters.

This is an alternative solution instead of #12228 which follows how this was solved in #11792
(Instead of altering ResultSetMapping::addIndexBy() to use the last found column name, we prevent adding additional column names for the same field)

Fixes #12225

This fixes an issue with a hydration error when fetching
on-to-many relationship with a indexBy definition when using inheritance mapping.
Fixes doctrine#12225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant