Use ManyToOne instead of OneToOne for master_picture_attachment like before

This commit is contained in:
Jan Böhmer 2023-07-20 21:54:13 +02:00
parent c0f626e9bd
commit 2e8cb35acc
12 changed files with 12 additions and 12 deletions

View file

@ -110,7 +110,7 @@ class Storelocation extends AbstractPartsContainingDBElement
#[ORM\OneToMany(targetEntity: StorelocationAttachment::class, mappedBy: 'element', cascade: ['persist', 'remove'], orphanRemoval: true)]
protected Collection $attachments;
#[ORM\OneToOne(targetEntity: StorelocationAttachment::class)]
#[ORM\ManyToOne(targetEntity: StorelocationAttachment::class)]
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
protected ?Attachment $master_picture_attachment = null;