fun <T : Any> MongoCollection<T>.replaceOneById(id: Any, replacement: T, options: ReplaceOptions = ReplaceOptions()): Maybe<UpdateResult>
(source)
Replace a document in the collection according to the specified arguments.
replacement
- the replacement document
options
- the options to apply to the replace operation
Return
the result of the replace one operation
fun <T : Any> MongoCollection<T>.replaceOneById(clientSession: ClientSession, id: Any, replacement: T, options: ReplaceOptions = ReplaceOptions()): Maybe<UpdateResult>
(source)
Replace a document in the collection according to the specified arguments.
clientSession
- the client session
replacement
- the replacement document
options
- the options to apply to the replace operation
Return
the result of the replace one operation