- 
    Type:New Feature 
- 
    Resolution: Duplicate
- 
    Priority:Minor - P4 
- 
    None
- 
    Affects Version/s: None
- 
    Component/s: Usability
- 
    None
- 
        Query
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
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.
- depends on
- 
                    SERVER-12280 allow $out to append to/merge with existing collection instead of replacing it -         
- Closed
 
-         
- is related to
- 
                    SERVER-21573 "dropDups" option for updates (including findAndModify) -         
- Closed
 
-