Olivier Massot 11 місяців тому
батько
коміт
b461fdf63d

+ 4 - 4
src/Entity/AccessWish/AccessWish.php

@@ -68,8 +68,8 @@ class AccessWish
     #[ORM\Column(length: 50, enumType: ValidationStateEnum::class)]
     private ValidationStateEnum $validationState;
 
-    #[ORM\ManyToOne(targetEntity: BillSchedule::class, inversedBy: 'accessWishes', cascade: ['persist'])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\ManyToOne(targetEntity: BillSchedule::class, cascade: ['persist'], inversedBy: 'accessWishes')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected BillSchedule $billSchedule;
 
     #[ORM\OneToOne(mappedBy: 'accessWishRib', targetEntity: DocumentWish::class, cascade: ['persist'])]
@@ -79,11 +79,11 @@ class AccessWish
     protected DocumentWish $documentSepa;
 
     #[ORM\ManyToOne(targetEntity: EducationCurriculumPack::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected EducationCurriculumPack $wishPack;
 
     #[ORM\ManyToOne(targetEntity: Place::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected Place $favoritePlace;
 
     /**

+ 2 - 2
src/Entity/AccessWish/EducationStudentWish.php

@@ -62,11 +62,11 @@ class EducationStudentWish
     protected Collection $teachers;
 
     #[ORM\ManyToOne(targetEntity: EquipmentList::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected EquipmentList $speciality;
 
     #[ORM\ManyToOne(targetEntity: Course::class, cascade: [], inversedBy: 'educationStudentWishes')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected Course $course;
 
     public function __construct()

+ 1 - 1
src/Entity/Billing/AbstractBillAccounting.php

@@ -30,7 +30,7 @@ abstract class AbstractBillAccounting
     #[ORM\Column(length: 255, nullable: false)]
     protected string $discr;
 
-    #[ORM\ManyToOne]
+    #[ORM\ManyToOne(targetEntity: Organization::class)]
     #[ORM\JoinColumn(nullable: true)]
     protected Organization $organization;
 

+ 2 - 2
src/Entity/Billing/AccessBilling.php

@@ -45,8 +45,8 @@ class AccessBilling
     #[ORM\OneToMany(mappedBy: 'accessBillingAccountBalanceReimbursement', targetEntity: BillPayment::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $accountBalanceReimbursements;
 
-    #[ORM\ManyToOne(targetEntity: BillSchedule::class, inversedBy: 'accessBilling', cascade: ['persist'])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\ManyToOne(targetEntity: BillSchedule::class, cascade: ['persist'], inversedBy: 'accessBilling')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected BillSchedule $billSchedule;
 
     public function __construct()

+ 2 - 2
src/Entity/Billing/BillPayment.php

@@ -45,11 +45,11 @@ class BillPayment
     private Collection $tags;
 
     #[ORM\ManyToOne(targetEntity: SddBank::class, cascade: ['persist'], inversedBy: 'billPayments')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected SddBank $sddBank;
 
     #[ORM\ManyToOne(targetEntity: SddRegie::class, cascade: ['persist'], inversedBy: 'billPayments')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected SddRegie $sddRegie;
 
     public function __construct()

+ 1 - 1
src/Entity/Billing/BillScheduleDate.php

@@ -18,7 +18,7 @@ class BillScheduleDate
     private int $id;
 
     #[ORM\ManyToOne(targetEntity: BillSchedule::class, cascade: ['persist'], inversedBy: 'scheduleDates')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected mixed $billSchedule;
 
     function getId(): int

+ 1 - 1
src/Entity/Billing/FamilyQuotientBand.php

@@ -20,7 +20,7 @@ class FamilyQuotientBand
     private int $id;
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientModel::class, cascade: [], inversedBy: 'familyQuotientBands')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(nullable: false)]
     protected mixed $familyQuotientModel;
 
     #[ORM\OneToMany(

+ 14 - 4
src/Entity/Billing/FamilyQuotientBandDetail.php

@@ -21,11 +21,11 @@ class FamilyQuotientBandDetail
     private int $id;
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientBand::class, cascade: [], inversedBy: 'familyQuotientBandDetails')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(nullable: false)]
     protected mixed $familyQuotientBand;
 
     #[ORM\ManyToOne(targetEntity: ResidenceArea::class, cascade: [], inversedBy: 'intangibleDiscountDetails')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected App\Entity\Billing\ResidenceArea $residenceArea;
 
     #[ORM\OneToMany(mappedBy: 'familyQuotientBandDetail', targetEntity: IntangibleDiscountDetail::class, cascade: [], orphanRemoval: true)]
@@ -69,9 +69,19 @@ class FamilyQuotientBandDetail
         return $this->intangibleDiscountDetails;
     }
 
-    function setIntangibleDiscountDetails(Collection $intangibleDiscountDetails): self
+    function addIntangibleDiscountDetail(IntangibleDiscountDetail $intangibleDiscountDetail): self
     {
-        $this->intangibleDiscountDetails = $intangibleDiscountDetails;
+        if (!$this->intangibleDiscountDetails->contains($intangibleDiscountDetail)) {
+            $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;
+        }
+
+        return $this;
+    }
+
+    function removeIntangibleDiscountDetail(IntangibleDiscountDetail $intangibleDiscountDetail): self
+    {
+        $this->intangibleDiscountDetails->removeElement($intangibleDiscountDetail);
+
         return $this;
     }
 }

+ 25 - 5
src/Entity/Billing/FamilyQuotientModel.php

@@ -22,7 +22,7 @@ class FamilyQuotientModel
     private int $id;
 
     #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [], inversedBy: 'familyQuotientModels')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(nullable: false)]
     protected App\Entity\Organization\Organization $organization;
 
     #[ORM\OneToMany(mappedBy: 'familyQuotientModel', targetEntity: FamilyQuotientBand::class, cascade: ['persist'], orphanRemoval: true)]
@@ -58,9 +58,19 @@ class FamilyQuotientModel
         return $this->familyQuotientBands;
     }
 
-    function setFamilyQuotientBands(Collection $familyQuotientBands): self
+    function addFamilyQuotientBand(FamilyQuotientBand $familyQuotientBand): self
     {
-        $this->familyQuotientBands = $familyQuotientBands;
+        if (!$this->familyQuotientBands->contains($familyQuotientBand)) {
+            $this->familyQuotientBands[] = $familyQuotientBand;
+        }
+
+        return $this;
+    }
+
+    function removeFamilyQuotientBand(FamilyQuotientBand $familyQuotientBand): self
+    {
+        $this->familyQuotientBands->removeElement($familyQuotientBand);
+
         return $this;
     }
 
@@ -69,9 +79,19 @@ class FamilyQuotientModel
         return $this->intangiblePriceAndDiscounts;
     }
 
-    function setIntangiblePriceAndDiscounts(Collection $intangiblePriceAndDiscounts): self
+    function addIntangiblePriceAndDiscount(IntangiblePriceAndDiscount $intangiblePriceAndDiscount): self
     {
-        $this->intangiblePriceAndDiscounts = $intangiblePriceAndDiscounts;
+        if (!$this->intangiblePriceAndDiscounts->contains($intangiblePriceAndDiscount)) {
+            $this->intangiblePriceAndDiscounts[] = $intangiblePriceAndDiscount;
+        }
+
+        return $this;
+    }
+
+    function removeIntangiblePriceAndDiscount(IntangiblePriceAndDiscount $intangiblePriceAndDiscount): self
+    {
+        $this->intangiblePriceAndDiscounts->removeElement($intangiblePriceAndDiscount);
+
         return $this;
     }
 }

+ 12 - 2
src/Entity/Billing/Odyssee.php

@@ -42,9 +42,19 @@ class Odyssee
         return $this->bills;
     }
 
-    function setBills(Collection $bills): self
+    function addBill(Bill $bill): self
     {
-        $this->bills = $bills;
+        if (!$this->bills->contains($bill)) {
+            $this->bills[] = $bill;
+        }
+
+        return $this;
+    }
+
+    function removeBill(Bill $bill): self
+    {
+        $this->bills->removeElement($bill);
+
         return $this;
     }
 

+ 5 - 5
src/Entity/Booking/Course.php

@@ -433,18 +433,18 @@ class Course extends AbstractBooking
         return $this->educationStudentWishes;
     }
 
-    function addEducationStudentWishe(EducationStudentWish $educationStudentWishe): self
+    function addEducationStudentWish(EducationStudentWish $educationStudentWish): self
     {
-        if (!$this->educationStudentWishes->contains($educationStudentWishe)) {
-            $this->educationStudentWishes[] = $educationStudentWishe;
+        if (!$this->educationStudentWishes->contains($educationStudentWish)) {
+            $this->educationStudentWishes[] = $educationStudentWish;
         }
 
         return $this;
     }
 
-    function removeEducationStudentWishe(EducationStudentWish $educationStudentWishe): self
+    function removeEducationStudentWish(EducationStudentWish $educationStudentWish): self
     {
-        $this->educationStudentWishes->removeElement($educationStudentWishe);
+        $this->educationStudentWishes->removeElement($educationStudentWish);
 
         return $this;
     }

+ 0 - 28
src/Entity/Booking/Examen.php

@@ -78,12 +78,6 @@ class Examen extends AbstractBooking
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
     protected Collection $tags;
 
-    #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
-    protected Collection $organizer;
-
-    #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
-    protected Collection $equipments;
-
     public function __construct()
     {
         $this->eventRecur = new ArrayCollection();
@@ -348,26 +342,4 @@ class Examen extends AbstractBooking
 
         return $this;
     }
-
-    function getOrganizer(): Collection
-    {
-        return $this->organizer;
-    }
-
-    function setOrganizer(Collection $organizer): self
-    {
-        $this->organizer = $organizer;
-        return $this;
-    }
-
-    function getEquipments(): Collection
-    {
-        return $this->equipments;
-    }
-
-    function setEquipments(Collection $equipments): self
-    {
-        $this->equipments = $equipments;
-        return $this;
-    }
 }

+ 0 - 42
src/Entity/Booking/OrganizationHoliday.php

@@ -35,15 +35,6 @@ class OrganizationHoliday extends AbstractBooking
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
-    #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
-    protected Collection $organizer;
-
-    #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
-    protected Collection $equipments;
-
-    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'bookings', cascade: ['persist'], orphanRemoval: false)]
-    protected Collection $tags;
-
     public function __construct()
     {
         $this->eventRecur = new ArrayCollection();
@@ -106,37 +97,4 @@ class OrganizationHoliday extends AbstractBooking
 
         return $this;
     }
-
-    function getOrganizer(): Collection
-    {
-        return $this->organizer;
-    }
-
-    function setOrganizer(Collection $organizer): self
-    {
-        $this->organizer = $organizer;
-        return $this;
-    }
-
-    function getEquipments(): Collection
-    {
-        return $this->equipments;
-    }
-
-    function setEquipments(Collection $equipments): self
-    {
-        $this->equipments = $equipments;
-        return $this;
-    }
-
-    function getTags(): Collection
-    {
-        return $this->tags;
-    }
-
-    function setTags(Collection $tags): self
-    {
-        $this->tags = $tags;
-        return $this;
-    }
 }

+ 0 - 42
src/Entity/Booking/PersonHoliday.php

@@ -34,15 +34,6 @@ class PersonHoliday extends AbstractBooking
     #[ORM\ManyToOne(inversedBy: 'holidays')]
     private Access $access;
 
-    #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
-    protected Collection $organizer;
-
-    #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
-    protected Collection $equipments;
-
-    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'bookings', cascade: ['persist'], orphanRemoval: false)]
-    protected Collection $tags;
-
     #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [])]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected Organization $organization;
@@ -110,39 +101,6 @@ class PersonHoliday extends AbstractBooking
         return $this;
     }
 
-    function getOrganizer(): Collection
-    {
-        return $this->organizer;
-    }
-
-    function setOrganizer(Collection $organizer): self
-    {
-        $this->organizer = $organizer;
-        return $this;
-    }
-
-    function getEquipments(): Collection
-    {
-        return $this->equipments;
-    }
-
-    function setEquipments(Collection $equipments): self
-    {
-        $this->equipments = $equipments;
-        return $this;
-    }
-
-    function getTags(): Collection
-    {
-        return $this->tags;
-    }
-
-    function setTags(Collection $tags): self
-    {
-        $this->tags = $tags;
-        return $this;
-    }
-
     function getOrganization(): Organization
     {
         return $this->organization;

+ 12 - 2
src/Entity/Core/AbstractRepair.php

@@ -34,9 +34,19 @@ abstract class AbstractRepair
         return $this->tags;
     }
 
-    function setTags(Collection $tags): self
+    function addTag(Tagg $tag): self
     {
-        $this->tags = $tags;
+        if (!$this->tags->contains($tag)) {
+            $this->tags[] = $tag;
+        }
+
+        return $this;
+    }
+
+    function removeTag(Tagg $tag): self
+    {
+        $this->tags->removeElement($tag);
+
         return $this;
     }
 }

+ 1 - 1
src/Entity/Core/City.php

@@ -20,7 +20,7 @@ class City
     private ?int $id = null;
 
     #[ORM\ManyToOne(targetEntity: Department::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(nullable: false)]
     protected Department $department;
 
     public function getId(): ?int

+ 1 - 1
src/Entity/Core/Department.php

@@ -20,7 +20,7 @@ class Department
     private ?int $id = null;
 
     #[ORM\ManyToOne(targetEntity: Region::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(nullable: false)]
     protected Region $region;
 
     public function getId(): ?int

+ 1 - 1
src/Entity/Core/Region.php

@@ -20,7 +20,7 @@ class Region
     private ?int $id = null;
 
     #[ORM\ManyToOne(targetEntity: Country::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(nullable: false)]
     protected Country $country;
 
     public function getId(): ?int

+ 60 - 10
src/Entity/Education/EducationCurriculumPack.php

@@ -84,9 +84,19 @@ class EducationCurriculumPack
         return $this->tags;
     }
 
-    function setTags(Collection $tags): self
+    function addTag(Tagg $tag): self
     {
-        $this->tags = $tags;
+        if (!$this->tags->contains($tag)) {
+            $this->tags[] = $tag;
+        }
+
+        return $this;
+    }
+
+    function removeTag(Tagg $tag): self
+    {
+        $this->tags->removeElement($tag);
+
         return $this;
     }
 
@@ -95,9 +105,19 @@ class EducationCurriculumPack
         return $this->requiredEducationCurriculums;
     }
 
-    function setRequiredEducationCurriculums(Collection $requiredEducationCurriculums): self
+    function addRequiredEducationCurriculum(EducationCurriculum $requiredEducationCurriculum): self
     {
-        $this->requiredEducationCurriculums = $requiredEducationCurriculums;
+        if (!$this->requiredEducationCurriculums->contains($requiredEducationCurriculum)) {
+            $this->requiredEducationCurriculums[] = $requiredEducationCurriculum;
+        }
+
+        return $this;
+    }
+
+    function removeRequiredEducationCurriculum(EducationCurriculum $requiredEducationCurriculum): self
+    {
+        $this->requiredEducationCurriculums->removeElement($requiredEducationCurriculum);
+
         return $this;
     }
 
@@ -106,9 +126,19 @@ class EducationCurriculumPack
         return $this->requiredChoicesEducationCurriculums;
     }
 
-    function setRequiredChoicesEducationCurriculums(Collection $requiredChoicesEducationCurriculums): self
+    function addRequiredChoicesEducationCurriculum(EducationCurriculum $requiredChoicesEducationCurriculum): self
+    {
+        if (!$this->requiredChoicesEducationCurriculums->contains($requiredChoicesEducationCurriculum)) {
+            $this->requiredChoicesEducationCurriculums[] = $requiredChoicesEducationCurriculum;
+        }
+
+        return $this;
+    }
+
+    function removeRequiredChoicesEducationCurriculum(EducationCurriculum $requiredChoicesEducationCurriculum): self
     {
-        $this->requiredChoicesEducationCurriculums = $requiredChoicesEducationCurriculums;
+        $this->requiredChoicesEducationCurriculums->removeElement($requiredChoicesEducationCurriculum);
+
         return $this;
     }
 
@@ -117,9 +147,19 @@ class EducationCurriculumPack
         return $this->optionnalEducationCurriculums;
     }
 
-    function setOptionnalEducationCurriculums(Collection $optionnalEducationCurriculums): self
+    function addOptionnalEducationCurriculum(EducationCurriculum $optionnalEducationCurriculum): self
     {
-        $this->optionnalEducationCurriculums = $optionnalEducationCurriculums;
+        if (!$this->optionnalEducationCurriculums->contains($optionnalEducationCurriculum)) {
+            $this->optionnalEducationCurriculums[] = $optionnalEducationCurriculum;
+        }
+
+        return $this;
+    }
+
+    function removeOptionnalEducationCurriculum(EducationCurriculum $optionnalEducationCurriculum): self
+    {
+        $this->optionnalEducationCurriculums->removeElement($optionnalEducationCurriculum);
+
         return $this;
     }
 
@@ -128,9 +168,19 @@ class EducationCurriculumPack
         return $this->intangibles;
     }
 
-    function setIntangibles(Collection $intangibles): self
+    function addIntangible(Intangible $intangible): self
     {
-        $this->intangibles = $intangibles;
+        if (!$this->intangibles->contains($intangible)) {
+            $this->intangibles[] = $intangible;
+        }
+
+        return $this;
+    }
+
+    function removeIntangible(Intangible $intangible): self
+    {
+        $this->intangibles->removeElement($intangible);
+
         return $this;
     }
 }

+ 1 - 1
src/Entity/Education/EducationStudent.php

@@ -59,7 +59,7 @@ class EducationStudent
     private EducationTiming $educationTiming;
 
     #[ORM\ManyToOne(targetEntity: EquipmentList::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected EquipmentList $speciality;
 
     public function __construct()

+ 2 - 3
src/Entity/Message/ReportMessage.php

@@ -21,15 +21,14 @@ class ReportMessage
     private int $id;
 
     #[ORM\ManyToOne(targetEntity: AbstractMessage::class, cascade: [], inversedBy: 'reportMessage')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     public mixed $message;
 
     #[ORM\ManyToOne(targetEntity: Access::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     public App\Entity\Access\Access $access;
 
     #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     public App\Entity\Organization\Organization $organization;
 
     function getId(): int

+ 0 - 1
src/Entity/Network/Network.php

@@ -42,7 +42,6 @@ class Network
     private Collection $organizations;
 
     #[ORM\ManyToOne(targetEntity: File::class, cascade: [], inversedBy: 'networks')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected File $image;
 
     #[Pure]

+ 0 - 1
src/Entity/Organization/Activity.php

@@ -55,7 +55,6 @@ class Activity
     private Collection $tags;
 
     #[ORM\ManyToOne(targetEntity: TypeOfPractice::class, cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected TypeOfPractice $typeOfSection;
 
     public function __construct()

+ 2 - 2
src/Entity/Organization/OnlineRegistrationDocument.php

@@ -27,8 +27,8 @@ class OnlineRegistrationDocument
     #[ORM\JoinColumn(nullable: true)]
     private OnlineRegistrationSettings $guardiansOnlineRegistrationSettings;
 
-    #[ORM\ManyToOne(targetEntity: OnlineRegistrationSettings::class, inversedBy: 'adultStudentDocuments', cascade: [])]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\ManyToOne(targetEntity: OnlineRegistrationSettings::class, cascade: [], inversedBy: 'adultStudentDocuments')]
+    #[ORM\JoinColumn(nullable: true)]
     protected OnlineRegistrationSettings $adultStudentOnlineRegistrationSettings;
 
     public function getId(): ?int

+ 2 - 2
src/Entity/Product/IntangibleDiscountDetail.php

@@ -38,11 +38,11 @@ class IntangibleDiscountDetail
     private FamilyQuotient $familyQuotient;
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientBandDetail::class, cascade: [], inversedBy: 'intangibleDiscountDetails')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected FamilyQuotientBandDetail $familyQuotientBandDetail;
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientBand::class, cascade: [], inversedBy: 'intangibleDiscountDetails')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected FamilyQuotientBand $familyQuotientBand;
 
     public function getId(): ?int

+ 1 - 1
src/Entity/Product/IntangiblePriceAndDiscount.php

@@ -31,7 +31,7 @@ class IntangiblePriceAndDiscount
     protected Intangible $intangible;
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientModel::class, cascade: [], inversedBy: 'intangiblePriceAndDiscounts')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected FamilyQuotientModel $familyQuotientModel;
 
     public function __construct()

+ 1 - 1
src/Entity/Token/Token.php

@@ -20,7 +20,7 @@ class Token
     private int $id;
 
     #[ORM\ManyToOne(targetEntity: Access::class, cascade: [], inversedBy: 'tokens')]
-    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private App\Entity\Access\Access $access;
 
     function getId(): int

+ 1 - 1
src/Service/Doctrine/SchemaValidation/SchemaSnippetsMaker.php

@@ -461,7 +461,7 @@ class SchemaSnippetsMaker
         $prop->addAttribute($relationClassNames[$type['type']], $options);
 
         if ($type['type'] === ClassMetadataInfo::MANY_TO_ONE) {
-            $prop->addAttribute(JoinColumn::class, ['referencedColumnName' => 'id', 'nullable' => false, 'onDelete' => 'SET NULL']);
+            $prop->addAttribute(JoinColumn::class, ['referencedColumnName' => 'id', 'nullable' => true, 'onDelete' => 'SET NULL']);
         }
 
         return $prop;