MongoDB and MySql Transaction
问题 I need to execute a multiple MySql Queries and Multiple MongoDB queries. If the execution of one of the queries fails (SQL or Mongo) I must rollback all the executed queries. Is that possible? 回答1: You might want to check out Spring Transactions. This is one of the solutions I am aware of. Another solution might be to do it manually: store the current documents/rows try to update them and roll back if necessary. It might help to take a step back and ask yourself whether it really makes sense