[SoftDeletable] How to disable on entity getter
Hello,
I have a entity List which has been created by a User List->getCreatedBy(). This User has been softdelete.
I'm requesting the same List and in the data I have createdBy with only the id of the User but if I try to request more information Symfony tell me that there is no User for this id.
Since he was softdelete it's a normal behavior, I suppose. But the thing is, I need these informations, so how can I disable softdeletable only for the getCreatedBy ?
Something like :
Model\List:
type: entity
gedmo:
soft_deleteable:
field_name: deletedAt
time_aware: false
manyToOne:
createdBy:
targetEntity: Model\User
gedmo:
soft_deleteable: false
Thanks you
Try to disable the softdeleteable filter before getting the info from the database:
$this->entityManager->getFilters()->disable('softdeleteable');
Help for the behavior of extensions should be asked on https://github.com/doctrine-extensions/DoctrineExtensions
This bundles only performs the registration in symfony