You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the fun <T : Any> MongoCollection<T>.updateMany(filter: Bson, vararg updates: SetTo<*>, updateOptions: UpdateOptions = UpdateOptions()): UpdateResult method on version 4.8.0 to update multiple properties at once for many documents that match the filter's criteria.
The updateMany() call in itself works and continues to edit the correct documents in the Mongo cluster, but it avoids serializing values properly. In my example I am trying to update an enum on the entity, which has been set correctly when inserting earlier, but is now being updated to the non-serialized value.
I am using the
fun <T : Any> MongoCollection<T>.updateMany(filter: Bson, vararg updates: SetTo<*>, updateOptions: UpdateOptions = UpdateOptions()): UpdateResult
method on version4.8.0
to update multiple properties at once for many documents that match the filter's criteria.The
updateMany()
call in itself works and continues to edit the correct documents in the Mongo cluster, but it avoids serializing values properly. In my example I am trying to update an enum on the entity, which has been set correctly when inserting earlier, but is now being updated to the non-serialized value.The enum
Type
is being serialized like the following:In methods like
replaceOne()
custom-serializable values are properly edited. We're using the following in a for loop as a workaround:Is there something we are missing, or is this a bug? We would expect the
updateMany()
call to behave the same in regards to serialization.~ Cheers
The text was updated successfully, but these errors were encountered: