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

Fix eager fetch composite foreign key #11397

Open
wants to merge 3 commits into
base: 2.20.x
Choose a base branch
from

Conversation

Brajk19
Copy link

@Brajk19 Brajk19 commented Mar 22, 2024

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.

@beberlei beberlei self-requested a review March 28, 2024 19:51
@beberlei beberlei self-assigned this Mar 28, 2024
Copy link
Contributor

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.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Oct 15, 2024
@beberlei
Copy link
Member

Need to look into this again

@github-actions github-actions bot removed the Stale label Oct 17, 2024
Copy link
Contributor

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.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Jan 22, 2025
@Brajk19 Brajk19 force-pushed the fix-eager-fetch-composite-foreign-key branch from 84f3d11 to b4bb7fc Compare January 23, 2025 13:11
@Brajk19 Brajk19 changed the base branch from 2.19.x to 2.20.x January 23, 2025 13:11
@Brajk19 Brajk19 force-pushed the fix-eager-fetch-composite-foreign-key branch from a8d8fde to 4786dac Compare January 23, 2025 13:25
@Brajk19
Copy link
Author

Brajk19 commented Jan 23, 2025

@beberlei can you take a look at PR?

@github-actions github-actions bot removed the Stale label Jan 24, 2025
@Brajk19
Copy link
Author

Brajk19 commented Feb 3, 2025

Hello @greg0ire
Sorry for ping. I’d really appreciate it if you could take a look when you have some time

@greg0ire
Copy link
Member

greg0ire commented Feb 3, 2025

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?

@Brajk19 Brajk19 force-pushed the fix-eager-fetch-composite-foreign-key branch from 4786dac to a86d234 Compare February 3, 2025 20:34
@Brajk19
Copy link
Author

Brajk19 commented Feb 3, 2025

@greg0ire okay, thanks anyway 😃

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.

3 participants