Fix taskgroup and task deletion (issue-99)
This commit is contained in:
parent
e88b030b03
commit
a66a72eb68
@ -33,7 +33,7 @@ public class Task {
|
||||
|
||||
private boolean finishable;
|
||||
|
||||
@OneToMany(mappedBy = "task", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||
@OneToMany(mappedBy = "task", cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
|
||||
private List<AbstractSchedule> basicTaskSchedules;
|
||||
|
||||
private int workTime;
|
||||
|
@ -25,7 +25,7 @@ public class Taskgroup {
|
||||
@JoinColumn(name = "taskgroupuser", nullable = false)
|
||||
private User user;
|
||||
|
||||
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
|
||||
private Set<Taskgroup> children;
|
||||
|
||||
@ManyToOne
|
||||
@ -33,7 +33,7 @@ public class Taskgroup {
|
||||
private Taskgroup parent;
|
||||
|
||||
|
||||
@OneToMany(mappedBy = "taskgroup", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||
@OneToMany(mappedBy = "taskgroup", cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
|
||||
private Set<Task> tasks;
|
||||
|
||||
public Taskgroup(String taskgroupName, User user) {
|
||||
|
Loading…
Reference in New Issue
Block a user