{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/6190","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/6190/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/6190/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/6190/events","html_url":"https://github.com/sequelize/sequelize/pull/6190","id":163241701,"number":6190,"title":"Fix count queries with includes","user":{"login":"BridgeAR","id":8822573,"avatar_url":"https://avatars.githubusercontent.com/u/8822573?v=3","gravatar_id":"","url":"https://api.github.com/users/BridgeAR","html_url":"https://github.com/BridgeAR","followers_url":"https://api.github.com/users/BridgeAR/followers","following_url":"https://api.github.com/users/BridgeAR/following{/other_user}","gists_url":"https://api.github.com/users/BridgeAR/gists{/gist_id}","starred_url":"https://api.github.com/users/BridgeAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BridgeAR/subscriptions","organizations_url":"https://api.github.com/users/BridgeAR/orgs","repos_url":"https://api.github.com/users/BridgeAR/repos","events_url":"https://api.github.com/users/BridgeAR/events{/privacy}","received_events_url":"https://api.github.com/users/BridgeAR/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-30T18:55:20Z","updated_at":"2016-07-03T20:54:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sequelize/sequelize/pulls/6190","html_url":"https://github.com/sequelize/sequelize/pull/6190","diff_url":"https://github.com/sequelize/sequelize/pull/6190.diff","patch_url":"https://github.com/sequelize/sequelize/pull/6190.patch"},"body":"### Pull Request check-list\r\n\r\n- [x] Does `npm run test` or `npm run test-DIALECT` pass with this change (including linting)?\r\n- [x] Does your issue contain a link to existing issue (Closes #[issue]) or a description of the issue you are solving?\r\n- [x] Have you added new tests to prevent regressions?\r\n- [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?\r\n- [x] Have you added an entry under `Future` in the changelog?\r\n\r\n### Description of change\r\n\r\nCurrently the `count` and `findAndCount` and diverge in the build queries with the same query object. This unifies those two, removes unnecessary duplicated checks and fixes a bug which quite a few people ran into by optimistically removing all includes for [performance reasons](82403cfc1d165e2a01b6b0170efae6fc0355ba85).\r\n\r\nI want to have fast queries but primarily stability is important. I'm willing to have a look at this in more detail to improve the performance later.\r\n\r\nFixes #1142 #2145 #2968 #3936 #4146 #4194 #5526 #5680 #6123 (I went through to many issues to always be certain but likely all get fixed by this).\r\nFixes partly #2886 #3319 #4737 #5465 (people that commented had similar issues or a part of the issue is fixed with this)\r\nSomehwat related #2713\r\n\r\nI know there should be tests included and I'll add them as soon as you're happy with the other code."},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/230174816","html_url":"https://github.com/sequelize/sequelize/pull/6190#issuecomment-230174816","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/6190","id":230174816,"user":{"login":"BridgeAR","id":8822573,"avatar_url":"https://avatars.githubusercontent.com/u/8822573?v=3","gravatar_id":"","url":"https://api.github.com/users/BridgeAR","html_url":"https://github.com/BridgeAR","followers_url":"https://api.github.com/users/BridgeAR/followers","following_url":"https://api.github.com/users/BridgeAR/following{/other_user}","gists_url":"https://api.github.com/users/BridgeAR/gists{/gist_id}","starred_url":"https://api.github.com/users/BridgeAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BridgeAR/subscriptions","organizations_url":"https://api.github.com/users/BridgeAR/orgs","repos_url":"https://api.github.com/users/BridgeAR/repos","events_url":"https://api.github.com/users/BridgeAR/events{/privacy}","received_events_url":"https://api.github.com/users/BridgeAR/received_events","type":"User","site_admin":false},"created_at":"2016-07-03T20:54:39Z","updated_at":"2016-07-03T20:54:39Z","body":"I backported all the comments from the v4 branch and included the attributes fix too."}}
{"actor":{"display_login":"BridgeAR"}}