Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3996

Remove restrictions on using field names with dots and dollars

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.0
    • Affects Version/s: None
    • Component/s: Write Operations
    • Labels:
      None
    • Needed

      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

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: