-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Codecs
-
None
Background
There are multiple ways to store a nested document in mongodb with dot in field names.
- Serialize the whole document as a string and store it.
- Since MongoDB have restrictions on only top level fields containing dot, we can wrap the entire document in another document whose only field name doesn't have a dot. While returning data, we can always query internal document of interest and return it.
But the important abilities we might loose are querying and patching of nested fields.
To be able to retain these two, we might have to replace dot character with some decent character sequence and persist it. Today, there is no easy way to specify a replacement for dot in codecs.
For e.g. Spring data for mongodb provides an easy way to do this:
Documentation:
Ask
It would be good to provide an easy knob to set replacement for special characters(dot and dollar to start with) and all the codecs should replace those special characters in the property names.
- is duplicated by
-
JAVA-2810 Allow dots and $ in field names
- Closed
- is related to
-
DRIVERS-618 Add escaping convention for dot and dollar signs
- Development Complete
- related to
-
SERVER-30575 Please add escaping convention for dot and dollar signs!
- Backlog