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

Commit 31844dd2 by Jan Aagaard Meier

Don't remove the transaction from the passed options object when doing setX in a…

… has-many. Closes #1789
1 parent 99acca94
......@@ -82,7 +82,8 @@ module.exports = (function() {
if ((defaultAttributes || {}).transaction instanceof Transaction) {
options.transaction = defaultAttributes.transaction;
delete defaultAttributes.transaction;
defaultAttributes = Utils._.omit(defaultAttributes, 'transaction'); // Don't try to insert the transaction as an attribute in the through table
}
unassociatedObjects = newAssociations.filter(function(obj) {
......
......@@ -44,7 +44,6 @@ module.exports = (function() {
if ((defaultAttributes || {}).transaction instanceof Transaction) {
options.transaction = defaultAttributes.transaction;
delete defaultAttributes.transaction;
}
if (obsoleteAssociations.length > 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!