with Document Class
abstract fun <NewTDocument : Any> withDocumentClass(newDocumentClass: KClass<NewTDocument>): MongoCollection<NewTDocument>
Content copied to clipboard
Create a new MongoCollection instance with a different default class to cast any documents returned from the database into..
Return
a new MongoCollection instance with the different default class
Parameters
new Document Class
the default class to cast any documents returned from the database into.