{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/4894","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/4894/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/4894/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/4894/events","html_url":"https://github.com/sequelize/sequelize/issues/4894","id":118071410,"number":4894,"title":"Issue with belongToMany association not working","user":{"login":"iam-peekay","id":5421194,"avatar_url":"https://avatars.githubusercontent.com/u/5421194?v=3","gravatar_id":"","url":"https://api.github.com/users/iam-peekay","html_url":"https://github.com/iam-peekay","followers_url":"https://api.github.com/users/iam-peekay/followers","following_url":"https://api.github.com/users/iam-peekay/following{/other_user}","gists_url":"https://api.github.com/users/iam-peekay/gists{/gist_id}","starred_url":"https://api.github.com/users/iam-peekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iam-peekay/subscriptions","organizations_url":"https://api.github.com/users/iam-peekay/orgs","repos_url":"https://api.github.com/users/iam-peekay/repos","events_url":"https://api.github.com/users/iam-peekay/events{/privacy}","received_events_url":"https://api.github.com/users/iam-peekay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T16:04:35Z","updated_at":"2015-11-20T16:05:52Z","closed_at":null,"body":"Hi. I've been trying for 1.5 days to get many-to-many association nor self-association to work, but no luck. I know that I've looked at other's people code and am doing it correctly. For example, I have one self association like this \r\n```\r\nUser.belongsToMany(User, { as: 'Follower', through: 'Followers'});\r\n\r\nfollowUser: function (userToFollow, user) {\r\n    return Promise.all([\r\n      User.findOne({where: {username: userToFollow}}), \r\n      User.findOne({where: {username: user}})])\r\n    .then(function (userToFollow, user) {\r\n          console.log('got here', userToFollow, user) // this returns fine, with 2 separate user objects\r\n      return userToFollow.addFollower(user); // this throws saying: \"[TypeError: userToFollow.addFollower is not a function]\"\r\n    })\r\n    .then(function (something) {\r\n      // DO SOMETHING;\r\n    });\r\n  }\r\n\r\n```\r\nPlayed around with this for hours and can't get to the bottom of it. Any help?"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/158444511","html_url":"https://github.com/sequelize/sequelize/issues/4894#issuecomment-158444511","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/4894","id":158444511,"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":"2015-11-20T16:05:52Z","updated_at":"2015-11-20T16:05:52Z","body":"A `then` callback only receives a single argument, in this case it would be an array since you use Promise.all, try using `spread` instead."}}