Tomas Kormanak
10/05/2023, 1:50 PMClass 'StringId' is not registered for polymorphic serialization in the scope of 'Id'
Any idea?Giuliopime
10/13/2023, 9:00 AMTomas Kormanak
10/13/2023, 9:05 AMval idCodec = KotlinSerializerCodec.create(
Id::class,
serializersModule = IdKotlinXSerializationModule
)
val registry = CodecRegistries.fromRegistries(
CodecRegistries.fromCodecs(idCodec), MongoClientSettings.getDefaultCodecRegistry()
)
val settings = MongoClientSettings.builder()
.applyConnectionString(ConnectionString(config.getTyped("database.url")))
.codecRegistry(registry)
.retryWrites(true)
.build()
val mongoClient = MongoClient.create(settings)
KotlinSerializerCodec.create
returns null