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

Merge/overwrite collections function

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Usability
    • None
    • Query

    Description

      A very useful feature would be the ability to merge collections together, overwriting/updating the records of one collection with those contained in another.

      db.overwriteCollection(destCollection, [srcCollection, ...], options);

      where srcCollection is the collection, or an array of collections, to be merged into/onto destCollection.

      options:

      update: true/false - whether to update (true) or replace (false, default behaviour when not set) any conflicting/existing records based on document id or unique key.
      remove: true/false - whether to remove the srcCollection(s) (true) on completion. false by default.

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            digitala Phillip Oldham
            Votes:
            7 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: