diff --git a/MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/model/RendezVous.java b/MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/model/RendezVous.java index b1cc5a2..438a7a5 100644 --- a/MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/model/RendezVous.java +++ b/MyINPulse-back/src/main/java/enseirb/myinpulse/postgres_db/model/RendezVous.java @@ -12,6 +12,12 @@ import java.util.List; @Table(name = "rendez_vous") public class RendezVous { + @OneToMany(mappedBy = "rendezVousEntrepreneurs", fetch = FetchType.LAZY, orphanRemoval = true) + private final List ListEntrepreneurs = new ArrayList<>(); + @OneToMany(mappedBy = "rendezVousAdministrateurs", fetch = FetchType.LAZY, orphanRemoval = true) + private final List ListAdministrateurs = new ArrayList<>(); + @OneToMany(mappedBy = "rendezVousComptesRendus", fetch = FetchType.LAZY, orphanRemoval = true) + private final List ListComptesRendus = new ArrayList<>(); @ManyToMany( fetch = FetchType.LAZY, cascade = {CascadeType.ALL}) @@ -30,12 +36,6 @@ public class RendezVous { @Column(length = 255) private String lieu_rdv; private String sujet_rdv; - @OneToMany(mappedBy = "rendezVousEntrepreneurs", fetch = FetchType.LAZY, orphanRemoval = true) - private List ListEntrepreneurs = new ArrayList<>(); - @OneToMany(mappedBy = "rendezVousAdministrateurs", fetch = FetchType.LAZY, orphanRemoval = true) - private List ListAdministrateurs = new ArrayList<>(); - @OneToMany(mappedBy = "rendezVousComptesRendus", fetch = FetchType.LAZY, orphanRemoval = true) - private List ListComptesRendus = new ArrayList<>(); public RendezVous() {}