Skip to content
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

Conversation

themasch
Copy link

@themasch themasch commented Feb 22, 2024

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

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 beberlei changed the title provides a test case for #11154 Do not use batch loading for collections with composite identifier Mar 16, 2024
beberlei
beberlei previously approved these changes Mar 16, 2024
Copy link
Member

@beberlei beberlei left a 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 beberlei changed the base branch from 2.18.x to 2.19.x March 16, 2024 22:10
@beberlei beberlei dismissed their stale review March 16, 2024 22:10

The base branch was changed.

beberlei
beberlei previously approved these changes Mar 16, 2024
@greg0ire greg0ire added this to the 2.19.2 milestone Mar 18, 2024
@greg0ire greg0ire merged commit 40a0964 into doctrine:2.19.x Mar 18, 2024
58 checks passed
@greg0ire
Copy link
Member

Thanks @themasch @beberlei !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants