Loading module/Oscar/src/Oscar/Service/PersonDeleteService.php +6 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Oscar\Service; use Oscar\Entity\ActivityPerson; use Oscar\Entity\OrganizationPerson; use Oscar\Entity\Person; use Oscar\Entity\ProjectMember; use Oscar\Entity\TimeSheet; use Oscar\Exception\OscarDeletePersonNotPossibleException; use Oscar\Exception\OscarException; Loading Loading @@ -41,6 +42,11 @@ class PersonDeleteService implements UseOscarUserContextService, UseEntityManage ->setParameter('person', $person); $del->getQuery()->execute(); $del = $this->getEntityManager()->createQueryBuilder()->delete(ProjectMember::class, 'n') ->where('n.person = :person') ->setParameter('person', $person); $del->getQuery()->execute(); $this->getEntityManager()->remove($person); $this->getEntityManager()->flush(); } Loading Loading
module/Oscar/src/Oscar/Service/PersonDeleteService.php +6 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Oscar\Service; use Oscar\Entity\ActivityPerson; use Oscar\Entity\OrganizationPerson; use Oscar\Entity\Person; use Oscar\Entity\ProjectMember; use Oscar\Entity\TimeSheet; use Oscar\Exception\OscarDeletePersonNotPossibleException; use Oscar\Exception\OscarException; Loading Loading @@ -41,6 +42,11 @@ class PersonDeleteService implements UseOscarUserContextService, UseEntityManage ->setParameter('person', $person); $del->getQuery()->execute(); $del = $this->getEntityManager()->createQueryBuilder()->delete(ProjectMember::class, 'n') ->where('n.person = :person') ->setParameter('person', $person); $del->getQuery()->execute(); $this->getEntityManager()->remove($person); $this->getEntityManager()->flush(); } Loading