fix: upsertWithWhere apply default id function

Signed-off-by: jannyHou <juehou@ca.ibm.com>
This commit is contained in:
jannyHou 2020-12-06 17:30:04 -05:00
parent a0de6bc760
commit c77d95d164
1 changed files with 1 additions and 1 deletions

View File

@ -772,7 +772,7 @@ DataAccessObject.upsertWithWhere = function(where, data, options, cb) {
let update = data;
let inst = data;
if (!(data instanceof Model)) {
inst = new Model(data, {applyDefaultValues: false});
inst = new Model(data);
}
update = inst.toObject(false);
Model.applyScope(query);