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 duplicate ID check for many assocs/embeds #4237

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

greg-rychlewski
Copy link
Member

Closes #4235

The underlying issue is that the function that extracts the pk values to check for duplicates is the same as the function that extracts the pk values to match current values to changes. The latter has to extract from changeset.data while the former should check for changeset.changes first and then changeset.data.

@greg-rychlewski greg-rychlewski changed the title Fix duplicate ID check for many assocs/embeds Draft: Fix duplicate ID check for many assocs/embeds Jul 20, 2023
@greg-rychlewski greg-rychlewski changed the title Draft: Fix duplicate ID check for many assocs/embeds Fix duplicate ID check for many assocs/embeds Jul 20, 2023
@greg-rychlewski greg-rychlewski merged commit 30311c2 into elixir-ecto:master Jul 20, 2023
7 checks passed
@greg-rychlewski greg-rychlewski deleted the duplicate_assoc branch July 20, 2023 07:30
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.

Embed changesets don't always give errors for duplicates primary keys
2 participants