Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1991

error message for '.' in key name is too vague in a $set command

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • Labels:
      None
    • Environment:
      1.6.3 / 64bit
    • Query
    • Fully Compatible

      This is good:

      > db.test.insert({"x.y":1})
      Fri Oct 22 13:08:29 uncaught exception: can't have . in field names [x.y]
      

      This was not good for a user to stumble on:

      > db.test.insert({"x":1})  
      > db.test.update({"x":1}, {"$set":{"y":{"z.z":1}}})
      not okForStorage
      

      I wish the $set error also explained the problem with the dot in the key name.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            drewp Drew Perttula
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: