不要怂,就是干,撸起袖子干!

Commit e1de2e37 by Jan Aagaard Meier

Change defaults to assign options when creation new associations in BTM

1 parent f38d0cae
Showing with 2 additions and 2 deletions
...@@ -457,7 +457,7 @@ BelongsToMany.prototype.injectSetter = function(obj) { ...@@ -457,7 +457,7 @@ BelongsToMany.prototype.injectSetter = function(obj) {
return attributes; return attributes;
}.bind(this)); }.bind(this));
promises.push(association.through.model.bulkCreate(bulk, _.defaults({ validate: true }, options))); promises.push(association.through.model.bulkCreate(bulk, _.assign({ validate: true }, options)));
} }
return Utils.Promise.all(promises); return Utils.Promise.all(promises);
...@@ -525,7 +525,7 @@ BelongsToMany.prototype.injectSetter = function(obj) { ...@@ -525,7 +525,7 @@ BelongsToMany.prototype.injectSetter = function(obj) {
return attributes; return attributes;
}.bind(this)); }.bind(this));
promises.push(association.through.model.bulkCreate(bulk, _.defaults({ validate: true }, options))); promises.push(association.through.model.bulkCreate(bulk, _.assign({ validate: true }, options)));
} }
changedAssociations.forEach(function(assoc) { changedAssociations.forEach(function(assoc) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!