-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Description
I've recently migrated from 2.10.0 to 4.2.1 and removed all deprecated code.
I'm using JacksonMongoCollection and almost everything works great except a corner case: for Map-based embedded docs: Filters.regexp does not work where DBQuery.regexp is fine.
Filters.regexp("field", Pattern.compile("^[0-9]"))works fine (serialized to a regexp doc)Filters.regexp("field.subfield", Pattern.compile("^[0-9]"))is NOT working (serialized to a string through a ToStringSerializer) (fieldbeing a genericMap<String,Object>in java)
Using a custom ObjectMapper and a custom PatternSerializer just inheriting EmbeddedObjectSerializer fixes the issue, but this should not fail to begin with.
I've prepared a PR for this, but I'm unsure if it's the best way to fix it, but serializing and deserializing in DocumentSerializationUtilsImpl#serializeFilter seems to lose information as I get at runtime a MapSerializer then ToStringSerializer and the db query sent to the server does not work.
Metadata
Metadata
Assignees
Labels
No labels