Draft
Conversation
4b48362 to ed39520 Compare c4a5985 to 0734360 Compare mvorisek commented Sep 4, 2022
| $softDeleteController->softDelete($entity); | ||
| | ||
| $entity->hook(Model::HOOK_AFTER_DELETE); | ||
| $entity->breakHook(false); // this will cancel original Model::delete() |
Member Author
There was a problem hiding this comment.
an alternative could be to replace the persistence during update so the delete hook does not need to be broken
Collaborator
There was a problem hiding this comment.
Both solutions are internal so we can go ahead in this way and add this feature.
Member Author
There was a problem hiding this comment.
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 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
replaces #692 and #1058 (issue #967)