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

Allow multiple relationships to a target entity. #615

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

mikeyudin
Copy link
Contributor

Subject

A cache key including the join table name fixes the issue where multiple many-to-many relationships to the same associated entity throws a Duplicate Key exception. This occurs because cache key was only storing the entity class name and target entity class name.

Closes #614.

Changelog

### Fixed
Allow multiple relationships to the same target entity.

…lationships to the same associated entity.
@VincentLanglet
Copy link
Member

Hi, thanks for the PR ; are you able to add a test to avoid a regression ?

@mikeyudin
Copy link
Contributor Author

@VincentLanglet Added tests.

@VincentLanglet
Copy link
Member

Hi, I fixed the issue coming from the 1.x branch in #616.

Please rebase 1.x and fix the cs/phpstan/psalm failure on your branch.
I can help you if needed.

Thanks.

@mikeyudin
Copy link
Contributor Author

@VincentLanglet I merged the main branch into the PR branch.

@VincentLanglet
Copy link
Member

@VincentLanglet I merged the main branch into the PR branch.

You also need to fix the failing build on your branch
image

@VincentLanglet VincentLanglet merged commit f65debc into sonata-project:1.x Apr 17, 2024
18 of 21 checks passed
@VincentLanglet
Copy link
Member

Gonna fix it

@mikeyudin
Copy link
Contributor Author

@VincentLanglet Thank you! Sorry, week started off hectic.

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

Successfully merging this pull request may close these issues.

Multiple many-to-many relationships to same table causes DUPLICATE KEY error.
2 participants