{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/4018","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/4018/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/4018/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/4018/events","html_url":"https://github.com/sequelize/sequelize/issues/4018","id":91443764,"number":4018,"title":"Define scope with includes after definition","user":{"login":"makrolabs","id":4398091,"avatar_url":"https://avatars.githubusercontent.com/u/4398091?v=3","gravatar_id":"","url":"https://api.github.com/users/makrolabs","html_url":"https://github.com/makrolabs","followers_url":"https://api.github.com/users/makrolabs/followers","following_url":"https://api.github.com/users/makrolabs/following{/other_user}","gists_url":"https://api.github.com/users/makrolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/makrolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makrolabs/subscriptions","organizations_url":"https://api.github.com/users/makrolabs/orgs","repos_url":"https://api.github.com/users/makrolabs/repos","events_url":"https://api.github.com/users/makrolabs/events{/privacy}","received_events_url":"https://api.github.com/users/makrolabs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-27T10:32:12Z","updated_at":"2015-07-01T06:26:41Z","closed_at":"2015-06-27T10:34:48Z","body":"When I have a model as follows:\r\n\r\n    var Group = Sequelize.define(\"Group\", {});\r\n    var Member = Sequelize.define(\"Member\", {});\r\n    Member.belongsTo(Group);\r\n    Group.hasMany(Member);\r\n\r\nThe models depend on each other, thus I can not define the scope when defining the model. How can I do something like this afterwards:\r\n\r\n    Member.defineScope(\"withGroup\", {\r\n        include: Group\r\n    });\r\n    Group.defineScope(\"withMembers\", {\r\n        include: Member\r\n    });"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/117449806","html_url":"https://github.com/sequelize/sequelize/issues/4018#issuecomment-117449806","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/4018","id":117449806,"user":{"login":"makrolabs","id":4398091,"avatar_url":"https://avatars.githubusercontent.com/u/4398091?v=3","gravatar_id":"","url":"https://api.github.com/users/makrolabs","html_url":"https://github.com/makrolabs","followers_url":"https://api.github.com/users/makrolabs/followers","following_url":"https://api.github.com/users/makrolabs/following{/other_user}","gists_url":"https://api.github.com/users/makrolabs/gists{/gist_id}","starred_url":"https://api.github.com/users/makrolabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makrolabs/subscriptions","organizations_url":"https://api.github.com/users/makrolabs/orgs","repos_url":"https://api.github.com/users/makrolabs/repos","events_url":"https://api.github.com/users/makrolabs/events{/privacy}","received_events_url":"https://api.github.com/users/makrolabs/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T06:26:41Z","updated_at":"2015-07-01T06:26:41Z","body":"@aarosil I have no solution. I found that this issue is already open: https://github.com/sequelize/sequelize/issues/3963"}}