kmongo / org.litote.kmongo.util / ObjectMappingConfiguration

ObjectMappingConfiguration

object ObjectMappingConfiguration (source)

Default object mapping configuration options. Set values before KMongo initialization.

Properties

serializeNull

Are null value serialized? Default to true for jackson & kotlinx.serialization. Default to false for native driver (for backward compatibility).

var serializeNull: Boolean

Functions

addCustomCodec

Adds a custom codec.

fun <T> addCustomCodec(codec: Codec<T>): Unit

generateIdsAsObjectIds

Generates Id (using newId) as ObjectId (default behaviour).

fun generateIdsAsObjectIds(): Unit

generateIdsAsStrings

Generates Id (using newId) as String.

fun generateIdsAsStrings(): Unit