{"action":"closed","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/8087","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/8087/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/8087/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/8087/events","html_url":"https://github.com/sequelize/sequelize/issues/8087","id":249086899,"number":8087,"title":"Unhandled rejection TypeError: Cannot read property 'query' of undefined","user":{"login":"ryanSN","id":15616532,"avatar_url":"https://avatars3.githubusercontent.com/u/15616532?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanSN","html_url":"https://github.com/ryanSN","followers_url":"https://api.github.com/users/ryanSN/followers","following_url":"https://api.github.com/users/ryanSN/following{/other_user}","gists_url":"https://api.github.com/users/ryanSN/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanSN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanSN/subscriptions","organizations_url":"https://api.github.com/users/ryanSN/orgs","repos_url":"https://api.github.com/users/ryanSN/repos","events_url":"https://api.github.com/users/ryanSN/events{/privacy}","received_events_url":"https://api.github.com/users/ryanSN/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2017-08-09T16:22:58Z","updated_at":"2018-03-20T05:07:34Z","closed_at":"2018-03-20T05:07:34Z","author_association":"NONE","body":"## What you are doing?\r\n<!-- Post a minimal, self-contained code sample that reproduces the issue, including models and associations -->\r\n\r\n```js\r\n    return sequelize.transaction((tx) => {\r\n      return Topping.destroy({where: {pizza_id: request.params.id}, transaction: tx})\r\n        .then((res) => {\r\n          return Pizza.destroy({\r\n            where: {id: request.params.id},\r\n            transaction: tx\r\n          })\r\n        })\r\n    }).then((res) => reply('Pizza removed'))\r\n      .catch((err) => reply(err)\r\n  })\r\n\r\n```\r\n\r\n## What do you expect to happen?\r\nA Transaction!\r\n\r\n## What is actually happening?\r\n```\r\nUnhandled rejection TypeError: Cannot read property 'query' of undefined\r\nat parameters.length.Promise (/Users/me/projects/pizza-api/node_modules/sequelize/lib/dialects/postgres/query.js:65:53)\r\n    at Promise._execute (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/debuggability.js:300:9)\r\n    at Promise._resolveFromExecutor (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/promise.js:483:18)\r\n    at new Promise (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/promise.js:79:10)\r\n    at Query.run (/Users/me/projects/pizza-api/node_modules/sequelize/lib/dialects/postgres/query.js:65:9)\r\n    at retry (/Users/me/projects/pizza-api/node_modules/sequelize/lib/sequelize.js:529:32)\r\n    at /Users/me/projects/pizza-api/node_modules/retry-as-promised/index.js:40:21\r\n    at Promise._execute (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/debuggability.js:300:9)\r\n    at Promise._resolveFromExecutor (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/promise.js:483:18)\r\n    at new Promise (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/promise.js:79:10)\r\n    at retryAsPromised (/Users/me/projects/pizza-api/node_modules/retry-as-promised/index.js:30:10)\r\n    at Promise.try.then.connection (/Users/me/projects/pizza-api/node_modules/sequelize/lib/sequelize.js:529:14)\r\n    at bound (domain.js:280:14)\r\n    at runBound (domain.js:293:12)\r\n    at tryCatcher (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/util.js:16:23)\r\n    at Promise._settlePromiseFromHandler (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/promise.js:512:31)\r\n    at Promise._settlePromise (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/promise.js:569:18)\r\n    at Promise._settlePromiseCtx (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/promise.js:606:10)\r\n    at Async._drainQueue (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/async.js:138:12)\r\n    at Async._drainQueues (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/async.js:143:10)\r\n    at Immediate.Async.drainQueues (/Users/me/projects/pizza-api/node_modules/bluebird/js/release/async.js:17:14)\r\n    at runCallback (timers.js:666:20)\r\n```\r\n\r\n\r\n__Dialect:__ postgres\r\n__Database version:__ 9.4.5.0\r\n__Sequelize version:__ 4.4.2\r\n__Bluebird version:__ 3.5.0\r\n\r\n\r\nTo note I downgraded to version __Sequelize version:__ 3.29.0, code above goes through fine as expected as a transaction\r\n"}}
{"actor":{"display_login":"sushantdhiman"}}