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.
This commit is contained in:
Christophe Siraut 2021-04-16 11:14:45 +02:00
parent 545be21d24
commit 341cb25653

View File

@ -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;