From 0f03199eb42b915256d08137995a9d78a73010c5 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Mon, 8 Sep 2025 16:05:31 -0500 Subject: [PATCH] fix: cascade removes monitors --- src/Monitor/Framework/Entity/Monitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()