mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
Enforce unique constraint on relation activity storedobject
This commit is contained in:
@@ -84,6 +84,11 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
*/
|
||||
#[Assert\Valid(traverse: true)]
|
||||
#[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist'])]
|
||||
#[ORM\JoinTable(
|
||||
name: 'activity_storedobject',
|
||||
joinColumns: new ORM\JoinColumn(name: 'activity_id', referencedColumnName: 'id', nullable: false),
|
||||
inverseJoinColumns: new ORM\InverseJoinColumn(name: 'storedobject_id', referencedColumnName: 'id', unique: true, nullable: false)
|
||||
)]
|
||||
private Collection $documents;
|
||||
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)]
|
||||
|
Reference in New Issue
Block a user