Skip to content

Conversation

@mvorisek
Copy link
Member

@mvorisek mvorisek commented Aug 18, 2022

replaces #692 and #1058 (issue #967)

@mvorisek mvorisek force-pushed the fix_soft_delete branch 2 times, most recently from 4b48362 to ed39520 Compare August 18, 2022 23:11
@mvorisek mvorisek force-pushed the fix_soft_delete branch 5 times, most recently from c4a5985 to 0734360 Compare September 1, 2022 20:51
$softDeleteController->softDelete($entity);

$entity->hook(Model::HOOK_AFTER_DELETE);
$entity->breakHook(false); // this will cancel original Model::delete()
Copy link
Member Author

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

Copy link
Collaborator

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.

Copy link
Member Author

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.

@mvorisek mvorisek force-pushed the fix_soft_delete branch 2 times, most recently from 11d578d to 7bc5f99 Compare September 4, 2022 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants