save
Save the document. If the document has no id field, or if the document has a null id value, insert the document. Otherwise, call replaceOneById with upsert true.
Parameters
the document to save
Throws
if the write failed due some other failure specific to the update command
if the write failed due being unable to fulfil the write concern
if the write failed due some other failure
Save the document. If the document has no id field, or if the document has a null id value, insert the document. Otherwise, call replaceOneById with upsert true.
Parameters
the client session with which to associate this operation
the document to save
Throws
if the write failed due some other failure specific to the update command
if the write failed due being unable to fulfil the write concern
if the write failed due some other failure