You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a model has_many through, and an association is added when editing the record, but a validation fails when the record is saved, the join table record remains. It appears that the association is being created in a separate transaction than the save, and so it is not being rolled back when the save fails. Although I believe this should not be the expected behavior, please advise if there are any workarounds for this to remove the join record, as when removing them explicitly when validation fails, that change is rolled back and they still persist.
The text was updated successfully, but these errors were encountered:
When a model has_many through, and an association is added when editing the record, but a validation fails when the record is saved, the join table record remains. It appears that the association is being created in a separate transaction than the save, and so it is not being rolled back when the save fails. Although I believe this should not be the expected behavior, please advise if there are any workarounds for this to remove the join record, as when removing them explicitly when validation fails, that change is rolled back and they still persist.
The text was updated successfully, but these errors were encountered: