@Transactional(propagation = REQUIRES_NEW)
String remove(Long id) {
NodeEntity node = nodeRepository.findById(id);
nodeRepository.delete(node);
return node.getType().getName();
}
class NodeEntity {
...
@ManyToOne(fetch = LAZY)
private TypeEntity type;
}