{"action":"opened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/3844","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/3844/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/3844/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/3844/events","html_url":"https://github.com/sequelize/sequelize/issues/3844","id":83290283,"number":3844,"title":"Is is possible to use transactions for add[singular] and add[plural]?","user":{"login":"basco-johnkevin","id":2178576,"avatar_url":"https://avatars.githubusercontent.com/u/2178576?v=3","gravatar_id":"","url":"https://api.github.com/users/basco-johnkevin","html_url":"https://github.com/basco-johnkevin","followers_url":"https://api.github.com/users/basco-johnkevin/followers","following_url":"https://api.github.com/users/basco-johnkevin/following{/other_user}","gists_url":"https://api.github.com/users/basco-johnkevin/gists{/gist_id}","starred_url":"https://api.github.com/users/basco-johnkevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basco-johnkevin/subscriptions","organizations_url":"https://api.github.com/users/basco-johnkevin/orgs","repos_url":"https://api.github.com/users/basco-johnkevin/repos","events_url":"https://api.github.com/users/basco-johnkevin/events{/privacy}","received_events_url":"https://api.github.com/users/basco-johnkevin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-01T03:26:45Z","updated_at":"2015-06-01T03:26:45Z","closed_at":null,"body":"is this the correct way to use transactions in add[singular]? `tickets.addLabel(label, {transaction: t});`\r\n\r\nIn the code below:\r\n```\r\ntickets.forEach(function(ticket, index) {\r\n  var hasLabelPromises = [];\r\n\r\n  labels.forEach(function(label) {\r\n    hasLabelPromises.push(ticket.hasLabel(label));\r\n  });\r\n\r\n  Q.all(hasLabelPromises).then(function(results) {\r\n    results.forEach(function(hasLabel, index2) {\r\n      if (! hasLabel) {\r\n        addLabelPromises.push(tickets[index].addLabel(labels[index2], {transaction: options.transaction}));\r\n      }\r\n    });\r\n  }).catch(function(err) {\r\n    return cb(err);\r\n  });\r\n});\r\n```\r\n the \r\n```\r\naddLabelPromises.push(tickets[index].addLabel(labels[index2], {transaction: options.transaction}));\r\n```\r\ncauses this error:\r\n\r\n`Possibly unhandled Error: commit has been called on this transaction, you can no longer use it`"}}