{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/5192","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/5192/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5192/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/5192/events","html_url":"https://github.com/sequelize/sequelize/issues/5192","id":126069410,"number":5192,"title":"Recent Commit Broke Attributes","user":{"login":"atom0s","id":1422090,"avatar_url":"https://avatars.githubusercontent.com/u/1422090?v=3","gravatar_id":"","url":"https://api.github.com/users/atom0s","html_url":"https://github.com/atom0s","followers_url":"https://api.github.com/users/atom0s/followers","following_url":"https://api.github.com/users/atom0s/following{/other_user}","gists_url":"https://api.github.com/users/atom0s/gists{/gist_id}","starred_url":"https://api.github.com/users/atom0s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom0s/subscriptions","organizations_url":"https://api.github.com/users/atom0s/orgs","repos_url":"https://api.github.com/users/atom0s/repos","events_url":"https://api.github.com/users/atom0s/events{/privacy}","received_events_url":"https://api.github.com/users/atom0s/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-12T00:24:18Z","updated_at":"2016-01-12T08:47:46Z","closed_at":"2016-01-12T08:47:46Z","body":"In a project that I work on, the following commit has caused a lot of our queries to now fail:\r\nhttps://github.com/sequelize/sequelize/commit/4aff3ae71e1c94b6454d25cfecc5912aed3cf796\r\n\r\nSpecifically the change to lib/model.js\r\n\r\nThis change overrides if you manually set attributes to collect and causes queries to fail. Perhaps this should be checked if attributes contains data already, if not then create an empty array instead. Otherwise this is a breaking commit that causes valid queries to now fail.\r\n\r\nBased on the tests, the intended implementation of this fix is to be used while scopes are defined. If no scope is given, this commit breaks working code."},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/170840829","html_url":"https://github.com/sequelize/sequelize/issues/5192#issuecomment-170840829","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/5192","id":170840829,"user":{"login":"mickhansen","id":699049,"avatar_url":"https://avatars.githubusercontent.com/u/699049?v=3","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T08:47:46Z","updated_at":"2016-01-12T08:47:46Z","body":"https://github.com/sequelize/sequelize/issues/5057\r\n\r\nThe code needs to be changed so that it's possible to apply scope without applying attributes.\r\nThe assumption and the tests for count has unfortunetaly been that we use the primary key, and users use `Model.aggregate` for more custom stuff, but obviously we do want to fix this regression."}}