Hard deleting with associations
mohinlakdawala opened this issue · 3 comments
mohinlakdawala commented
From what I can see, this doesn't cascade the hard deletes to the associated models (the way it does for soft-deletes) or am I missing something ?
PGBI commented
No it does not. I should better document that.
mohinlakdawala commented
Is it possible to add this feature in the trait ?
PGBI commented
Sorry @mohinlakdawala for the late answer.. I would rather not add this feature for the following reasons:
- it wouldn't be backward compatible,
- this feature is ambiguous: let's imagine that Users have many Posts, and that both Users and Posts use SoftDeleteTrait. When hard deleting a user, should the posts it owns be hard or soft deleted?