diff --git a/src/main/java/com/github/prominence/carrepair/model/Order.java b/src/main/java/com/github/prominence/carrepair/model/Order.java index 111cfb5..2084d00 100644 --- a/src/main/java/com/github/prominence/carrepair/model/Order.java +++ b/src/main/java/com/github/prominence/carrepair/model/Order.java @@ -23,12 +23,12 @@ public class Order { private String description; @NotNull - @ManyToOne(fetch = FetchType.EAGER) // change to LAZY after DTO implementation + @ManyToOne(fetch = FetchType.EAGER, optional = false) // change to LAZY after DTO implementation @JoinColumn(name = "client_id", nullable = false) private Client client; @NotNull - @ManyToOne(fetch = FetchType.EAGER) // change to LAZY after DTO implementation + @ManyToOne(fetch = FetchType.EAGER, optional = false) // change to LAZY after DTO implementation @JoinColumn(name = "mechanic_id", nullable = false) private Mechanic mechanic;