Skip to content

Conflicts with SoftDelete when cascade delete #20

@ezequielgonzalez

Description

@ezequielgonzalez

I have a model with two objects where one of them has a composite relation with the other. Both objects uses SoftDelete, and the parent cascades the SoftDelete to dependant objects that act as Sortable.
The problem arrise when you delete one element of the parent object. I tryed adding the deleted_at field to the uniqueBy. But, as all the related objects have the same deleted_at value, when the postDelete tries to reorder all the records, it throws a constraint violation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions