diff --git a/src/Monitor/Framework/Entity/Monitor.php b/src/Monitor/Framework/Entity/Monitor.php index 467c851..e2b0a2f 100644 --- a/src/Monitor/Framework/Entity/Monitor.php +++ b/src/Monitor/Framework/Entity/Monitor.php @@ -68,7 +68,7 @@ class Monitor #[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children')] private ?self $parent = null; - #[ORM\OneToMany(targetEntity: self::class, mappedBy: 'parent')] + #[ORM\OneToMany(targetEntity: self::class, mappedBy: 'parent', cascade: ['remove'])] private Collection $children; public function __construct()