Due to a tcmalloc bug, MongoDB 8.x cannot run under the Linux kernel 6.19+.
Because our testing infrastructure runs under such a kernel, we are not able to continue testing the library with MongoDB 8.x.
We are not aware of any differences in MongoDB 8.x that could affect KtMongo.
Testing will MongoDB 8.x will restart once tcmalloc is fixed.
Follow this issue to learn more.
Additionally, we will no longer support MongoDB 6.x releases, as MongoDB themselves have stopped supporting it.
The kotlin.time.Instant has been stabilized in Kotlin 2.3.0. The @ExperimentalTime annotation has thus been removed from all methods that use it internally (!196)
The MongoDB official driver has two main serialization modes: :bson-kotlin (based on reflection) and :bson-kotlinx (based on KotlinX.Serialization). These two systems serialize objects slightly differently.
Most notably, the newly-added types kotlin.time.Instant and kotlin.uuid.Uuid are both serialized by :bson-kotlinx as strings, but are serialized to the corresponding BSON type by :bson-kotlin.
This release introduces the serializers InstantAsBsonDatetimeSerializer and UuidAsBsonBinarySerializer which use the BSON type no matter what serialization library is used, but also support JSON serialization as strings.
Users have to enable them explicitly (see their documentation to learn how).
In this version, we also ensured that the KtMongo types (ObjectId and Timestamp) are serialized correctly using both serialization strategies.