kmongo / org.litote.kmongo.reactivestreams / com.mongodb.reactivestreams.client.MongoCollection / replaceOneById

replaceOneById

fun <T : Any> MongoCollection<T>.replaceOneById(id: Any, replacement: T): Publisher<UpdateResult> (source)

Replace a document in the collection according to the specified arguments.

Parameters

id - the object id

replacement - the replacement document

fun <T : Any> MongoCollection<T>.replaceOneById(id: Any, replacement: T, options: ReplaceOptions): Publisher<UpdateResult> (source)

Replace a document in the collection according to the specified arguments.

Parameters

id - the object id

replacement - the replacement document

options - the options to apply to the replace operation