From 583cb0aca0720215d109918e0307a2c33be2ea25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Wed, 17 Apr 2024 18:15:23 +0200 Subject: [PATCH] Fix Deleting Taskgroup when Taskgroup has parent --- backend/src/main/java/core/entities/timemanager/Taskgroup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/core/entities/timemanager/Taskgroup.java b/backend/src/main/java/core/entities/timemanager/Taskgroup.java index ffea384..5effc3f 100644 --- a/backend/src/main/java/core/entities/timemanager/Taskgroup.java +++ b/backend/src/main/java/core/entities/timemanager/Taskgroup.java @@ -25,7 +25,7 @@ public class Taskgroup { @JoinColumn(name = "taskgroupuser", nullable = false) private User user; - @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true) + @OneToMany(mappedBy = "parent", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER, orphanRemoval = true) private Set children; @ManyToOne