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

Error on invalid $pull: "{$pull: {flags : {$each : [1,2,3]}}}"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.2
    • Affects Version/s: None
    • Component/s: Querying, Write Ops
    • None
    • ALL

      This should generate an error as it is not valid for storage and could be a simple user mistake. Also, when you use it a query filter it errors out.

      > db.a.find({r:{$each:1}})
      error: { "$err" : "invalid operator: $each", "code" : 10068 }
      > db.a.update({}, {$pull:{r:{$each:1}}})
      

      I suspect that many things will error out on the query side but not when used with $pull/updates.

            Assignee:
            Unassigned Unassigned
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: