-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use batch loading for collections with composite identifier #11289
Merged
greg0ire
merged 6 commits into
doctrine:2.19.x
from
themasch:reproduce-issue-11154-composite-key-eager-fetch-one
Mar 18, 2024
Merged
Do not use batch loading for collections with composite identifier #11289
greg0ire
merged 6 commits into
doctrine:2.19.x
from
themasch:reproduce-issue-11154-composite-key-eager-fetch-one
Mar 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After 2.17 (some?) EAGER fetched OneToMany associations stopped working, if they have multiple join columns. Loads for these associations will trigger a `MessingPositionalParameter` exception "Positional parameter at index 1 does not have a bound value". This test case should reproduce this issue, so it can be fixed.
beberlei
changed the title
provides a test case for #11154
Do not use batch loading for collections with composite identifier
Mar 16, 2024
beberlei
previously approved these changes
Mar 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug is valid, introduced a fix and updated the PR title and description with details.
beberlei
previously approved these changes
Mar 16, 2024
greg0ire
approved these changes
Mar 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In 2.17 EAGER fetched OneToMany associations stopped working, if they have multiple join columns due to #8391.
Loads for these associations will trigger a
MessingPositionalParameter
exception "Positional parameter at index 1 does not have a bound value".This test case should reproduce this issue (#11154), so it can be fixed.
The PR changes eager loading for target associations with composite identifier not to use batch loading anymore, falling back to the original behavior before #8391. It also cleans up the conditions here after they were made more complex than necessary with #11082
Related:
Fixes #11154