diff --git a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java b/backend/src/main/java/de/hft/geotime/record/TimeRecord.java index c349c58..1405cf6 100644 --- a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java +++ b/backend/src/main/java/de/hft/geotime/record/TimeRecord.java @@ -18,8 +18,8 @@ public class TimeRecord { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; - @OneToOne - private TimetrackAccount account; // TimetrackAccount ID (Lazy) + @OneToOne(fetch = FetchType.LAZY) + private TimetrackAccount account; private Date startdate; private Date enddate; private Duration time; diff --git a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java b/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java index ff3c30c..d8b7d32 100644 --- a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java +++ b/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java @@ -30,7 +30,7 @@ public class TimetrackUser { private String lastname; - @OneToOne + @OneToOne(fetch = FetchType.EAGER) private Role role; @OneToMany(mappedBy = "user", fetch = FetchType.LAZY, cascade = CascadeType.ALL)