Fix taskgroup and task deletion (issue-99)
All checks were successful
Java CI with Maven / test (push) Successful in 5m41s
Java CI with Maven / build-and-push-frontend (push) Successful in 9m0s
Java CI with Maven / build-and-push-backend (push) Successful in 1m32s

This commit is contained in:
Sebastian Böckelmann 2024-03-13 18:26:47 +01:00
parent e88b030b03
commit a66a72eb68
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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) {