`on_conflict: :nothing` for a create action
Is there a way to set something like
Maybe there is a better way to handle this?
on_conflict: :nothing
for a create action?
I've added this to my action, but IMO it looks weird:
Maybe there is a better way to handle this?
3 Replies
Actually this:
doesn't work. It looks like it still does an update.
but this:
kind of works, it doesn't update but instead of doing nothing it returns "Attempted to update stale record" error.
I'm confused now.
I tried:
It doesn't change the record, but it doesn't prevent creating related stuff via
manage_relationship
.Yeah, the managed relationship stuff happens regardless
The upsert condition not working when it's
false
is a bug please open an issue
There is an option you can pass to return the skipped row
It's off by default for security reasonsGitHub
upsert_condition expr(false)
doesn't work · Issue #2333 · ash-p...Code of Conduct I agree to follow this project's Code of Conduct AI Policy I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue. Versions As...