spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

Add support for MongoDB Kotlin sync/coroutine Driver.

Open christophstrobl opened this issue 2 years ago • 1 comments

Provide an extension for SimpleMongoClientDatabaseFactory & SimpleReactiveMongoDatabaseFactory that accepts a com.mongodb.kotlin.client.MongoClient respectively com.mongodb.kotlin.client.coroutine.MongoClient

Since the Kotlin driver is wrapping the Java driver we can unwrap the instance and pass it on to the factory.

Though unfortunate that there's no public API to access the wrapped instance the provided tests will alert on driver changes.

Closes: #4393

christophstrobl avatar Jun 07 '23 06:06 christophstrobl

@rozza would it be possible to have some public API in the Kotlin driver to access the underlying Java driver? Currently we need to use reflection to get hold on the wrapped client.

christophstrobl avatar Jun 07 '23 06:06 christophstrobl