mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 12:18:54 +02:00
Fixed problem with failing foreign key constraints on preview pic (1/2)
This commit is contained in:
parent
c39a9a4da7
commit
82aec6f1ee
3 changed files with 174 additions and 2 deletions
|
@ -34,7 +34,7 @@ trait MasterAttachmentTrait
|
|||
/**
|
||||
* @var Attachment
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment")
|
||||
* @ORM\JoinColumn(name="id_preview_attachement", referencedColumnName="id")
|
||||
* @ORM\JoinColumn(name="id_preview_attachment", referencedColumnName="id", onDelete="SET NULL", nullable=true)
|
||||
* @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture")
|
||||
*/
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue