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