diff --git a/src/Entity/Base/AbstractStructuralDBElement.php b/src/Entity/Base/AbstractStructuralDBElement.php index f1e3794c..6f8378ca 100644 --- a/src/Entity/Base/AbstractStructuralDBElement.php +++ b/src/Entity/Base/AbstractStructuralDBElement.php @@ -26,6 +26,7 @@ use App\Entity\Attachments\Attachment; use App\Entity\Parameters\AbstractParameter; use App\Repository\StructuralDBElementRepository; use App\EntityListeners\TreeCacheInvalidationListener; +use Doctrine\Common\Proxy\Proxy; use Doctrine\DBAL\Types\Types; use App\Entity\Attachments\AttachmentContainingDBElement; use App\Entity\Parameters\ParametersTrait; @@ -348,11 +349,6 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement throw new \InvalidArgumentException('You can not use one of the element childs as parent!'); } */ - //Ensure that the parent is of the same type as this element - if (!$new_parent instanceof static) { - throw new \InvalidArgumentException('The parent must be of the same type as this element!'); - } - $this->parent = $new_parent; //Add this element as child to the new parent