Mongoose.js transactions
问题 I know MongoDB doesn't support transactions as relational databases do, but I still wonder how to achieve atomicity for several operations. Hunting around the web, I see people mentioning Transactions without Transactions. Reading through the slides, I am still not clear how to implement that with Mongoose.js. Take this code snippet for example: player.save(callback1); story.save(callback2); How do I implement callback1 and callback2 so that they either succeed together or fail together? 回答1: