From 341cb2565341f16921af0ff03e791440ae33dc12 Mon Sep 17 00:00:00 2001 From: Christophe Siraut Date: Fri, 16 Apr 2021 11:14:45 +0200 Subject: [PATCH] AccompanyingPeriodParticipation: set cascade=persist for accompanyingPeriod fixes : A new entity was found through the relationship 'Chill\PersonBundle\Entity\AccompanyingPeriodParticipation#accompanyingPeriod' that was not configured t o cascade persist operations for entity: Chill\PersonBundle\Entity\AccompanyingPeriod@0000000002b1d44a000000002510e4e2. To solve this issue: Either explici tly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem implement 'Chill\PersonBundle\Entity\AccompanyingPeriod#__toString()' to get a clue. --- .../Entity/AccompanyingPeriodParticipation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php index 9a807b179..c22e84e42 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php @@ -50,7 +50,7 @@ class AccompanyingPeriodParticipation private $person; /** - * @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="participations") + * @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="participations", cascade={"persist"}) * @ORM\JoinColumn(name="accompanyingperiod_id", referencedColumnName="id", nullable=false) */ private $accompanyingPeriod;