From 9d73cc086988294c661d1142b18eb229e71c5302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Tue, 24 Sep 2019 16:09:54 +0200 Subject: [PATCH] Fixed exception on login. --- src/Entity/Base/MasterAttachmentTrait.php | 1 - src/Entity/Parts/Part.php | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Entity/Base/MasterAttachmentTrait.php b/src/Entity/Base/MasterAttachmentTrait.php index 2637e187..17c084eb 100644 --- a/src/Entity/Base/MasterAttachmentTrait.php +++ b/src/Entity/Base/MasterAttachmentTrait.php @@ -48,7 +48,6 @@ trait MasterAttachmentTrait * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment") * @ORM\JoinColumn(name="id_preview_attachement", referencedColumnName="id") * @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture") - * @ColumnSecurity(prefix="attachments", type="object") */ protected $master_picture_attachment; diff --git a/src/Entity/Parts/Part.php b/src/Entity/Parts/Part.php index 34d370e5..d022394c 100644 --- a/src/Entity/Parts/Part.php +++ b/src/Entity/Parts/Part.php @@ -61,6 +61,7 @@ declare(strict_types=1); namespace App\Entity\Parts; +use App\Entity\Attachments\Attachment; use App\Entity\Attachments\AttachmentContainingDBElement; use App\Entity\Devices\Device; use App\Entity\Parts\PartTraits\AdvancedPropertyTrait; @@ -128,6 +129,14 @@ class Part extends AttachmentContainingDBElement */ protected $attachments; + /** + * @var Attachment + * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment") + * @ORM\JoinColumn(name="id_preview_attachement", referencedColumnName="id") + * @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture") + */ + protected $master_picture_attachment; + public function __construct() { parent::__construct();