Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
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.