fix: removed contradictive @NotNull preventing to add data to database.
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user