-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.2.5
-
Component/s: None
I've just noticed that a call to replaceOne() also includes in the updateWriteOpResult the replacement document, in the undocumented ops array.
Is this intended? For large replacement documents, this could be a performance problem.
Also, this behavior becomes identical to findOneAndReplace() called with returnOriginal: false. My expectation was that replaceOne() did not return the replaced or replacement document.
In any case, it would help to document the ops array.