Answer the question
In order to leave comments, you need to log in
Is it possible to Fetch a remote entity within a single transaction?
There is something like this
@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;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question