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

Improve update error message for storage validation

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.6.0-rc2
    • 2.6.0-rc0
    • Write Ops
    • Fully Compatible

    Description

      1. Slightly off error message:

      {
      	"query" : {	},
      	"update" : {
      		"$set" : {
      			"$foo" : 1
      		}
      	},
      	"err" : "$foo is not valid for storage."
      }
      {
      	"query" : {},
      	"update" : {
      		"$set" : {"a.$foo" : 2}
      	},
      	"err" : "$foo is not valid for storage."

      Suggest change to
      "DollarPrefixedFieldName: $foo is not a valid field name"
      I would prefer "a.$foo" instead of "$foo" in the second example.

      Attachments

        Activity

          People

            scotthernandez Scott Hernandez (Inactive)
            andreas.nilsson Andreas Nilsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: