From dbda564048778f43ae1618ecc214af2afdf1f2e3 Mon Sep 17 00:00:00 2001 From: Tom Zellman Date: Mon, 17 Apr 2017 16:43:50 -0400 Subject: [PATCH] Fix the bulkWrite::updateMany case, where the update option was inadvertently being wrapped by the filter option --- lib/model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model.js b/lib/model.js index 35bb745815c..47ff7d0c0e5 100644 --- a/lib/model.js +++ b/lib/model.js @@ -2115,7 +2115,7 @@ Model.bulkWrite = function(ops, options, callback) { try { op['updateMany']['filter'] = cast(_this.schema, op['updateMany']['filter']); - op['updateMany']['update'] = castUpdate(_this.schema, op['updateMany']['filter'], { + op['updateMany']['update'] = castUpdate(_this.schema, op['updateMany']['update'], { strict: _this.schema.options.strict, overwrite: false });