diff --git a/src/Service/InvitePartnerService.php b/src/Service/InvitePartnerService.php index 4c1eed7..cd9bcdc 100644 --- a/src/Service/InvitePartnerService.php +++ b/src/Service/InvitePartnerService.php @@ -140,7 +140,7 @@ private function createEmailAndSmsData(ObjectEntity $requester, ObjectEntity $pe */ private function invitePartner(array $huwelijk, string $id): ?array { - $this->entityManager->clear(); + $this->entityManager->clear('App\Entity\ObjectEntity'); $huwelijkObject = $this->entityManager->getRepository('App:ObjectEntity')->find($id); if ($huwelijkObject instanceof ObjectEntity === false) { $this->pluginLogger->error('Could not find huwelijk with id '.$id); diff --git a/src/Service/InviteWitnessService.php b/src/Service/InviteWitnessService.php index b468afc..74f6ae3 100644 --- a/src/Service/InviteWitnessService.php +++ b/src/Service/InviteWitnessService.php @@ -250,6 +250,9 @@ private function inviteWitness(array $huwelijk, string $id): array $huwelijkObject = $this->updateChecklistService->checkHuwelijk($huwelijkObject); }//end if + $this->entityManager->persist($huwelijkObject); + $this->entityManager->flush(); + return $huwelijkObject->toArray(); }//end inviteWitness()