Advertisement
ronaldkwandy

Untitled

Oct 16th, 2019
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.     @Transactional
  2.     public void deleteAll(List<E> entities) {
  3.         if (entities == null || entities.isEmpty())
  4.             return;
  5.        
  6.         mainRepo.deleteAll(entities);
  7.         mainRepo.flush();
  8.        
  9.         // delete succeeded when reaching here
  10.         String id = entities.get(0).root().getId();
  11.         P root = rootRepository.getOne(id);
  12.         updateRoot(root);
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement