我有2个存储库,一个用于mongodb(DocumentRepository),另一个用于hibernate实体(EntityRepository)
我有一个简单的服务:
@Transactional public doSomePersisting() { try { this.entityRepository.save(entity); this.documentRepository.save(document); } catch(...) { //Rollback mongoDB here } }
是否可以在"// Rollback mongoDB here"行回滚mongoDB?我已经从实体部分回滚(Transactional annotation)