yii2-relation-trait icon indicating copy to clipboard operation
yii2-relation-trait copied to clipboard

Feature Request: softDelete()

Open optmsp opened this issue 3 years ago • 0 comments

Unless I'm using this trait incorrectly, to use soft deletes we need to always use the method $model->deleteWithRelated(). The method $model->delete() continues to do a hard delete. While I like that $model->deleteWithRelated() recurses through children data to soft delete them as well as the parent, sometimes it would be nice to simply have a softDelete() instead of building an exception list for $skippedRelations.

Is that on the drawing board? Would you accept a PR with this method if not?

optmsp avatar Jan 02 '22 19:01 optmsp