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;
|
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 List<AbstractSchedule> basicTaskSchedules;
|
||||||
|
|
||||||
private int workTime;
|
private int workTime;
|
||||||
|
@ -25,7 +25,7 @@ public class Taskgroup {
|
|||||||
@JoinColumn(name = "taskgroupuser", nullable = false)
|
@JoinColumn(name = "taskgroupuser", nullable = false)
|
||||||
private User user;
|
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;
|
private Set<Taskgroup> children;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@ -33,7 +33,7 @@ public class Taskgroup {
|
|||||||
private Taskgroup parent;
|
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;
|
private Set<Task> tasks;
|
||||||
|
|
||||||
public Taskgroup(String taskgroupName, User user) {
|
public Taskgroup(String taskgroupName, User user) {
|
||||||
|
Loading…
Reference in New Issue
Block a user