mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +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
|
@ -63,7 +63,7 @@ class AttachmentType extends AbstractStructuralDBElement
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: AttachmentTypeAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: AttachmentTypeAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class LabelProfile extends AttachmentContainingDBElement
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: AttachmentTypeAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: AttachmentTypeAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class Currency extends AbstractStructuralDBElement
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: CurrencyAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: CurrencyAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ class Project extends AbstractStructuralDBElement
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: ProjectAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: ProjectAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: GroupAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: GroupAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
|||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\OneToOne(targetEntity: UserAttachment::class)]
|
||||
#[ORM\ManyToOne(targetEntity: UserAttachment::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