I am creating a Symfony2 project and using gedmo/doctrine-extensions ( GitHub ) to implement soft deletion. My question is: is there a way to "disable" or "override" softdelete, or even detect that something has been softly deleted.
Here's the situation:
I have a "note" object that references a "custom" object. A specific note mentions a user who has been deleted from a soft point. Although the user has been deleted, it returns true for TWIG "defined" and may even return the identifier of the remote user. However, if I request any other information (including the "deletedAt" parameter, which indicates whether it was deleted), I get an 500 "Entity was not found" error.
Since the data actually still exists, and since the note itself has not been deleted, I still want to say who wrote the note, even though the user was deleted.
Is it possible? If not, how to correctly determine if something has been gently removed? As I said, $note->getUser() still retrieves the object and returns true for any null / "specific" matches.
symfony doctrine soft-delete
Nathan rutman
source share