Dots allowed in field names of objects in a list

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.10.1
    • Component/s: None
    • None
    • Environment:
      mongo 2.2.3, java 1.6, mongo java driver 2.7.1, although tested with 2.10.1.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I've ran into an issue where dots are allowed in object keys when the object is in a list, but not in allowed in embedded map or document key names. After further reading, I discovered that dots are not allowed in any mongo key.

      This example fails using the "Try it out" browser shell on the mongo home page but works using the latest version of the java driver.
      > db.test.insert({test:[

      {'0.0':'test'}

      ]})
      JS Error: can't have . in field names [0.0]

      I also attached the groovy script that I used to verify that this is an issue with the latest version of the driver.

            Assignee:
            Unassigned
            Reporter:
            Dan Polites
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: