Symfony: how to cascade undelete when using SoftDeleteable behavior extension? Symfony: how to cascade undelete when using SoftDeleteable behavior extension? symfony symfony

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:

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.