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

Allow multi update without $ operator

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Do
    • Affects Version/s: 2.5.2
    • Fix Version/s: None
    • Component/s: Write Ops
    • Labels:
      None

      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: