Handle parent deletion in associated tables (PersonBundle)

This commit is contained in:
Marc Ducobu
2021-05-25 23:46:05 +02:00
parent f1c77277f3
commit 1d4edd5b7b
2 changed files with 32 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
* @ORM\ManyToOne(
* targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod",
* inversedBy="comments")
* @ORM\JoinColumn(nullable=false)
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $accompanyingPeriod;