fun <T> MongoCollection<T>.findOneById(id: Any): T?
(source)
Finds the document that match the id parameter.
Return
the first item returned or null
fun <T> MongoCollection<T>.findOneById(clientSession: ClientSession, id: Any): T?
(source)
Finds the document that match the id parameter.
clientSession
- the client session with which to associate this operation
Return
the first item returned or null