Symfony: how to cascade undelete when using SoftDeleteable behavior extension?
Never used this extension but looking at open issues on GH repository I can see quite a few of them related to similar problems when working with associations:
- https://github.com/Atlantic18/DoctrineExtensions/issues/656
- https://github.com/Atlantic18/DoctrineExtensions/issues/1101
- https://github.com/Atlantic18/DoctrineExtensions/issues/505
I'd try first to disable explicitly the filter for each related entity:
$filter = $em->getFilters()->enable('soft-deleteable');$filter->disableForEntity('Entity\Article');$filter->disableForEntity('Entity\SomeOtherEntity');
Otherwise I'd add a Listener (and bind it to one of the Doctrine events) to cascade the restore outside of soft-deleteable
.