Closed benoittgt closed 2 years ago
You mean raise error when dependent: :restrict_with_exception
detected ?
class Author < ActiveRecord::Base
acts_as_paranoid
has_many :posts, dependent: :restrict_with_exception
end
author.destroy # => raise error
@turnon completely !
Thanks
Hello
This is not an issue but more a feature request and a discussion.
I have a table with a foreign key constraint to another table entry. The problem is
acts_as_paranoid
skips constraint CHECK because destroyed record are only updated.I would like to know if it could be a good idea to add an option to delete and rollback the transaction and properly raise the foreign key constraint violation if there is one.
So still soft delete + raise on FK constraint violation.