I’ve read in this blog article https://blog.meteor.com/meteor-1-8-erases-the-debts-of-1-7-77af4c931fe3 that meteor now is able to get mongo’s transaction oplog correctly…
But how can I use this transactions in the first place? How can I access a mongo client to start a session and make updates to multiple collections atomic?
Somehow I’m not able to use google correctly to get an answer, so I thought I ask you.
My problem is, that even if I throw that error and do the abortTransaction method, the entry in collection1 will be made…
I know I have to connect the update and the insert call to the session but I don’t know how… Do I have to use the raw collection to achieve this, or can I use the Meteor collection with some parameters?
Your issue is in ussing the Collection and not the rawCollection. Meteor collections doesnt support transactions yet. So your code will looks like this.