- 
    Type:
Bug
 - 
    Resolution: Won't Do
 - 
    Priority:
Major - P3
 - 
    None
 - 
    Affects Version/s: 2.6.4, 2.7.5
 - 
    Component/s: Shell
 
- 
        Server Development Platform
 - 
        ALL
 - 
        
 - 
        Build A (10/09/15), Build B (10/30/15)
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
According to the fluent API spec https://github.com/10gen/specifications/blob/master/source/driver-fluent-api.rst
replaceOne should always replace and never update a document. This should be ensured by checking that the new document is not prefixed with '$'.
This is currently not enforced in the shell bulk API implementation. replaceOne calls updateOne directly without any extra checks.
- is related to
 - 
                    
SERVER-28383 Shell bulk.updateOne allows replacement
-         
 - Closed
 
 -         
 
- related to
 - 
                    
SERVER-48780 bulkWrite() in mongo shell does not check updates start with '$' and replacements do not
-         
 - Closed
 
 -