-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Write Operations
-
None
Summary
Remove any validation code in drivers that prevents storing data with "$" and "." in key names. Without an MQL-wide escaping mechanism, the server will provide users with some tools that will allow them to express queries over such data. Drivers must document how to express such queries.
Motivation
Many data sources, including MongoDB's own system.profile, contain information stored with dots or dollars in the key names. Any user who wishes to operate on change stream notifications, the schema of the config database, the system.profile collection, or MongoDB structured log data may need to express queries over key names with dot and dollar. Some users may also ingest unsanitized data from outside sources, and currently would be forced to implement their own escaping before storing the data in order to ensure it is queryable. Many users also wish to use well-known formats that involve dots as key names, such as URLs or IP addresses.
MQL has limited facilities for expressing queries over such data. Historically, both the driver and the server have rejected attempts to insert data of this form in order to prevent a situation where users have data over which they cannot easily express queries. This is a common source of complaint from the user
- is related to
-
JAVA-3452 java.lang.IllegalArgumentException: Invalid BSON field name
- Closed