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

M2M without on_conflict #1046

Open
Forceres opened this issue Jul 6, 2024 · 2 comments
Open

M2M without on_conflict #1046

Forceres opened this issue Jul 6, 2024 · 2 comments

Comments

@Forceres
Copy link

Forceres commented Jul 6, 2024

I think that on_conflict part in add_m2m would be very useful for avoiding duplicates in m2m, why it isn't supported yet?

@sinisaos
Copy link
Member

sinisaos commented Jul 6, 2024

@Forceres There was a PR for it, but it never took off. Maybe @dantownsend has a better way to solve that problem. As you can see in that PR, it's just a few lines of code (with combination of unique constraints in joining_table) that would be useful to prevent duplicate entries in M2M.

@Forceres
Copy link
Author

Forceres commented Jul 8, 2024

@Forceres There was a PR for it, but it never took off. Maybe @dantownsend has a better way to solve that problem. As you can see in that PR, it's just a few lines of code (with combination of unique constraints in joining_table) that would be useful to prevent duplicate entries in M2M.

A lot of vital PRs were not merged. What a pity!

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

No branches or pull requests

2 participants