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

Relations: fix M2M related primary key #10368

Merged
merged 5 commits into from
Dec 10, 2021

Conversation

AdiechaHK
Copy link
Contributor

@AdiechaHK AdiechaHK commented Dec 7, 2021

Problem

Cause & Solution

In many to many relationships, 2 tables have relationships using the 3rd intermediate table. And mostly the primary key is set as id only so it missed to set the primary key of the relational table instead of the junction table. So it’s causing an issue when we set the primary key of the relational table to something else (and not id).

I’ve changed that as expected and it’s working now.

*Special Thanks - to @Vishalsag for helping me in debugging the issue.


Fixes #8417
Fixes #9923

@joselcvarela joselcvarela changed the title m2m field name bug fix Relations: fix M2M related primary key Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Impossible to add existing item from M2M interface M2M and M2A reloads on every key press
3 participants