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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Write Ops
    • Labels:
      None
    • Environment:
      1.6.3 / 64bit
    • Backwards Compatibility:
      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

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: