Tiny fix: use setAttributes

This commit is contained in:
Fabien Franzen 2014-08-11 13:03:51 +02:00
parent c3f7a7acb5
commit 93fab448bc
1 changed files with 1 additions and 3 deletions

View File

@ -1699,9 +1699,7 @@ EmbedsMany.prototype.updateById = function (fkId, data, cb) {
if (inst instanceof modelTo) {
if (typeof data === 'object') {
for (var key in data) {
inst[key] = data[key];
}
inst.setAttributes(data);
}
var err = inst.isValid() ? null : new ValidationError(inst);
if (err && typeof cb === 'function') {