Don't enforce strictness if allowExtendedOperators: true (MongoDB)
This commit is contained in:
parent
c7caa0a7c1
commit
a94993c097
|
@ -2297,6 +2297,9 @@ DataAccessObject.prototype.updateAttributes = function updateAttributes(data, op
|
|||
assert(typeof connector.updateAttributes === 'function',
|
||||
'updateAttributes() must be implemented by the connector');
|
||||
|
||||
var allowExtendedOperators = connector.settings
|
||||
&& connector.settings.allowExtendedOperators;
|
||||
|
||||
var strict = this.__strict;
|
||||
var model = Model.modelName;
|
||||
var hookState = {};
|
||||
|
@ -2335,7 +2338,7 @@ DataAccessObject.prototype.updateAttributes = function updateAttributes(data, op
|
|||
if (err) return cb(err);
|
||||
data = ctx.data;
|
||||
|
||||
if (strict) {
|
||||
if (strict && !allowExtendedOperators) {
|
||||
var props = Model.definition.properties;
|
||||
var keys = Object.keys(data);
|
||||
var result = {};
|
||||
|
|
Loading…
Reference in New Issue