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

Merge/overwrite collections function

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • None
    • None
    • Usability
    • None

    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

        Issue Links

          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: