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

Allow multi update without $ operator

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.5.2
    • Component/s: Write Ops
    • None
    • Query

      An update with multi: true is currently only allowed if it uses $ operators, such as $set to modify individual fields. If you try to replace the entire document, you get the error message "multi update only works with $ operators".

      After some discussion, it was concluded that there are indeed cases where it makes sense to replace a number of documents with a given, single document (except the _id field, obviously).

      So this ticket requests to remove the above error condition and carry out the operation as usual, i.e. replace all the selected documents with the update document.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            andre.spiegel@mongodb.com Andre Spiegel
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: