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

Dots allowed in field names of objects in a list

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.10.1
    • None
    • None
    • mongo 2.2.3, java 1.6, mongo java driver 2.7.1, although tested with 2.10.1.

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            danpolites Dan Polites
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: