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

Allow multi update without $ operator

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • 2.5.2
    • Write Ops
    • None
    • Query

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: