fun <T : Any> MongoCollection<T>.save(document: T): Completable
(source)
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.
document
- the document to save
fun <T : Any> MongoCollection<T>.save(clientSession: ClientSession, document: T): Completable
(source)
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.