with Codec Registry
abstract fun withCodecRegistry(codecRegistry: CodecRegistry): MongoDatabase
Content copied to clipboard
Create a new MongoDatabase instance with a different codec registry.
Return
a new MongoDatabase instance with the different codec registry
Parameters
codec Registry
the new org.bson.codecs.configuration.CodecRegistry for the database