fix: cascade removes monitors
This commit is contained in:
@@ -68,7 +68,7 @@ class Monitor
|
|||||||
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children')]
|
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children')]
|
||||||
private ?self $parent = null;
|
private ?self $parent = null;
|
||||||
|
|
||||||
#[ORM\OneToMany(targetEntity: self::class, mappedBy: 'parent')]
|
#[ORM\OneToMany(targetEntity: self::class, mappedBy: 'parent', cascade: ['remove'])]
|
||||||
private Collection $children;
|
private Collection $children;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|||||||
Reference in New Issue
Block a user