fix: removed contradictive @NotNull preventing to add data to database.

This commit is contained in:
Pierre Tellier
2025-03-09 21:04:52 +01:00
parent dded62c25a
commit 215d80ad70
8 changed files with 5 additions and 22 deletions

View File

@ -1,7 +1,6 @@
package enseirb.myinpulse.model;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalTime;
@ -17,9 +16,6 @@ public class Appointment {
new ArrayList<>(); */
// should now be useless
@OneToOne(mappedBy = "appointmentReport", fetch = FetchType.LAZY, orphanRemoval = true)
private Report report;
@ManyToMany(
fetch = FetchType.LAZY,
cascade = {CascadeType.ALL})
@ -28,9 +24,9 @@ public class Appointment {
joinColumns = @JoinColumn(name = "idAppointment"),
inverseJoinColumns = @JoinColumn(name = "idSectionCell"))
List<SectionCell> listSectionCell = new ArrayList<>();
@OneToOne(mappedBy = "appointmentReport", fetch = FetchType.LAZY, orphanRemoval = true)
private Report report;
@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idAppointment;