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

Pass allow_stale opt to assocs #4528

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

tomconroy
Copy link
Contributor

When implementing the soft delete detailed here I ran into errors when soft deleting assocs, it seems we just need to pass the allow_stale option on to the assocs to allow this

Copy link
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please update the docs as well? Thank you!

Copy link
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just mention it cascades to associations. :)

@tomconroy
Copy link
Contributor Author

Done! I also updated the language slightly and removed the "Only applies to updates." note on insert_or_update as it will now affect inserts with associations. I think this change doesn't affect delete, I'm not sure though.

@josevalim josevalim merged commit 4f0c990 into elixir-ecto:master Oct 20, 2024
6 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@tomconroy tomconroy deleted the allow-stale-assocs branch October 21, 2024 13:57
@tomconroy tomconroy restored the allow-stale-assocs branch November 12, 2024 18:23
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.

2 participants