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

Merge/overwrite collections function

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Usability
    • None
    • Query

      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.

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

              Created:
              Updated:
              Resolved: