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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Gone away
    • None
    • None
    • Write Ops
    • None
    • 1.6.3 / 64bit
    • Query
    • Fully Compatible

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: