-
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
Fix eager fetch composite foreign key #11397
base: 2.20.x
Are you sure you want to change the base?
Fix eager fetch composite foreign key #11397
Conversation
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
Need to look into this again |
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
84f3d11
to
b4bb7fc
Compare
a8d8fde
to
4786dac
Compare
@beberlei can you take a look at PR? |
Hello @greg0ire |
I don't think I can be of much help here, sorry… that being said, it looks like your change breaks the build, so you should probably fix that so that the branch is clean next time Benjamin has time to look into it. Also, maybe @themash has opinions on this? |
4786dac
to
a86d234
Compare
@greg0ire okay, thanks anyway 😃 |
I think #11289 did not completely fix problem for eager fetch.
Change in that PR checked if primary key of target class is composite but that does not matter when loading collection by foreign key.
It should check if foreign key on target class is composite.
Fix from that PR did not work for me because i had entity with regular autogenerated id (single column), but foreign key referenced entity with composite primary key, like
SecondLevelWithoutCompositePrimaryKey
in this PR.Checking if foreign key is composite fixed the problem for me.