issue-113: Fix all Delete Operations #114
@ -15,9 +15,6 @@ public class TaskSerie {
|
|||||||
@OneToMany(fetch = FetchType.EAGER, mappedBy = "taskSerie", orphanRemoval = true)
|
@OneToMany(fetch = FetchType.EAGER, mappedBy = "taskSerie", orphanRemoval = true)
|
||||||
List<TaskSerieItem> tasks = new ArrayList<>();
|
List<TaskSerieItem> tasks = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public long getTaskSerieID() {
|
public long getTaskSerieID() {
|
||||||
return taskSerieID;
|
return taskSerieID;
|
||||||
}
|
}
|
||||||
|
@ -135,11 +135,7 @@ public class TaskSeriesService {
|
|||||||
task.setTaskSerieItem(null);
|
task.setTaskSerieItem(null);
|
||||||
taskSerieItemRepository.delete(item);
|
taskSerieItemRepository.delete(item);
|
||||||
if(taskSerie.getTasks().isEmpty()) {
|
if(taskSerie.getTasks().isEmpty()) {
|
||||||
for(TaskSerieItem taskSerieItem : taskSerie.getTasks()) {
|
taskSeriesRepository.deleteUnreferenced();
|
||||||
taskSerieItem.setTaskSerie(null);
|
|
||||||
}
|
|
||||||
taskSerie.getTasks().clear();
|
|
||||||
taskSeriesRepository.delete(taskSerie);
|
|
||||||
} else if(task.getParent() == null){
|
} else if(task.getParent() == null){
|
||||||
repearIndexing(taskSerie, item.getSeriesIndex());
|
repearIndexing(taskSerie, item.getSeriesIndex());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user