mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-14 20:35:08 +02:00
Use ManyToOne instead of OneToOne for master_picture_attachment like before
This commit is contained in:
parent
c0f626e9bd
commit
2e8cb35acc
12 changed files with 12 additions and 12 deletions
|
@ -120,7 +120,7 @@ class Category extends AbstractPartsContainingDBElement
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: CategoryAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: CategoryAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: FootprintAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: FootprintAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class Manufacturer extends AbstractCompany
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: ManufacturerAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: ManufacturerAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: MeasurementUnitAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: MeasurementUnitAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ class Supplier extends AbstractCompany
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: SupplierAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: SupplierAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue