accompanying course work: add cascade remove on delete Accompanying Period Work

This commit is contained in:
nobohan 2021-11-12 12:02:45 +01:00
parent eedf5f25bd
commit 32c2d96ab6
2 changed files with 3 additions and 2 deletions

View File

@ -167,7 +167,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\OneToMany( * @ORM\OneToMany(
* targetEntity=AccompanyingPeriodWorkEvaluation::class, * targetEntity=AccompanyingPeriodWorkEvaluation::class,
* mappedBy="accompanyingPeriodWork", * mappedBy="accompanyingPeriodWork",
* cascade={"persist"}, * cascade={"remove"},
* orphanRemoval=true * orphanRemoval=true
* ) * )
* @Serializer\Groups({"read"}) * @Serializer\Groups({"read"})

View File

@ -70,7 +70,8 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
/** /**
* @ORM\ManyToOne( * @ORM\ManyToOne(
* targetEntity=StoredObject::class * targetEntity=StoredObject::class,
* cascade={"remove"},
* ) * )
* @Serializer\Groups({"read"}) * @Serializer\Groups({"read"})
*/ */