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

Adding entry_ids to assocs built with cast_assoc #22

Open
Danwhy opened this issue Dec 6, 2018 · 0 comments
Open

Adding entry_ids to assocs built with cast_assoc #22

Danwhy opened this issue Dec 6, 2018 · 0 comments
Assignees

Comments

@Danwhy
Copy link
Member

Danwhy commented Dec 6, 2018

If we apply the cast_assoc function to a changeset, the association is added to the changes, and will be inserted into the database if it doesn't exist.

This can cause a problem for us, as the association will be inserted without an entry id.

To fix this, when adding the entry_id on the insert function, we should iterate through the changes, checking if there are any nested changesets, and add entry_ids to those too.

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

No branches or pull requests

1 participant