Description
On https://docs.mongodb.com/master/core/transactions/#transactions-in-applications, in the Java tab, the code sample is wrong.
Insead of
coll1.insertOne(new Document("abc", 1));
|
coll2.insertOne(new Document("xyz", 999));
|
it should be
coll1.insertOne(clientSession, new Document("abc", 1));
|
coll2.insertOne(clientSession , new Document("xyz", 999));
|
I'm not sure where the source for this code lives. I thought it would be in the Java driver repository, but I don't see it there.
Thanks to shane.harvey for spotting this.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
|