Merge branch '52-lazy-and-eager-fetching' into 'master'
Resolve "Lazy and eager fetching" Closes #52 See merge request marcel.schwarz/2020ss-qbc-geofence-timetracking!46
This commit is contained in:
commit
96671d5350
@ -18,8 +18,8 @@ public class TimeRecord {
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private long id;
|
private long id;
|
||||||
@OneToOne
|
@OneToOne(fetch = FetchType.LAZY)
|
||||||
private TimetrackAccount account; // TimetrackAccount ID (Lazy)
|
private TimetrackAccount account;
|
||||||
private Date startdate;
|
private Date startdate;
|
||||||
private Date enddate;
|
private Date enddate;
|
||||||
private Duration time;
|
private Duration time;
|
||||||
|
@ -30,7 +30,7 @@ public class TimetrackUser {
|
|||||||
|
|
||||||
private String lastname;
|
private String lastname;
|
||||||
|
|
||||||
@OneToOne
|
@OneToOne(fetch = FetchType.EAGER)
|
||||||
private Role role;
|
private Role role;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "user", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "user", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
|
||||||
|
Loading…
Reference in New Issue
Block a user