-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add native soft-delete support #1054
base: develop
Are you sure you want to change the base?
Conversation
4b48362
to
ed39520
Compare
c4a5985
to
0734360
Compare
$softDeleteController->softDelete($entity); | ||
|
||
$entity->hook(Model::HOOK_AFTER_DELETE); | ||
$entity->breakHook(false); // this will cancel original Model::delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an alternative could be to replace the persistence during update so the delete hook does not need to be broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both solutions are internal so we can go ahead in this way and add this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, such changes can have effect on overrided delete method or user hooks, very important decision that needs literaly hours of very fine reasoning to decide this correctly.
11d578d
to
7bc5f99
Compare
7bc5f99
to
5f44dc4
Compare
5f44dc4
to
5c2f6a2
Compare
replaces #692 and #1058 (issue #967)