{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/5630","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/5630/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5630/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/5630/events","html_url":"https://github.com/sequelize/sequelize/pull/5630","id":142910127,"number":5630,"title":"Try to clarify adding and setting associations","user":{"login":"gonsfx","id":603683,"avatar_url":"https://avatars.githubusercontent.com/u/603683?v=3","gravatar_id":"","url":"https://api.github.com/users/gonsfx","html_url":"https://github.com/gonsfx","followers_url":"https://api.github.com/users/gonsfx/followers","following_url":"https://api.github.com/users/gonsfx/following{/other_user}","gists_url":"https://api.github.com/users/gonsfx/gists{/gist_id}","starred_url":"https://api.github.com/users/gonsfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonsfx/subscriptions","organizations_url":"https://api.github.com/users/gonsfx/orgs","repos_url":"https://api.github.com/users/gonsfx/repos","events_url":"https://api.github.com/users/gonsfx/events{/privacy}","received_events_url":"https://api.github.com/users/gonsfx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-23T09:36:11Z","updated_at":"2016-03-23T11:21:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sequelize/sequelize/pulls/5630","html_url":"https://github.com/sequelize/sequelize/pull/5630","diff_url":"https://github.com/sequelize/sequelize/pull/5630.diff","patch_url":"https://github.com/sequelize/sequelize/pull/5630.patch"},"body":"With a little help from @mickhansen in Slack i realized that all of the `addX` and `setY` methods added to models through associations work on *existing* rows in the database and can not be used to insert new rows, which is what the `create` association methods are for.\r\n\r\nWith this PR, i try to clarify this in the docs because it might have clicked for me when i read it like this."},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/200302097","html_url":"https://github.com/sequelize/sequelize/pull/5630#issuecomment-200302097","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/5630","id":200302097,"user":{"login":"gonsfx","id":603683,"avatar_url":"https://avatars.githubusercontent.com/u/603683?v=3","gravatar_id":"","url":"https://api.github.com/users/gonsfx","html_url":"https://github.com/gonsfx","followers_url":"https://api.github.com/users/gonsfx/followers","following_url":"https://api.github.com/users/gonsfx/following{/other_user}","gists_url":"https://api.github.com/users/gonsfx/gists{/gist_id}","starred_url":"https://api.github.com/users/gonsfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonsfx/subscriptions","organizations_url":"https://api.github.com/users/gonsfx/orgs","repos_url":"https://api.github.com/users/gonsfx/repos","events_url":"https://api.github.com/users/gonsfx/events{/privacy}","received_events_url":"https://api.github.com/users/gonsfx/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T11:21:34Z","updated_at":"2016-03-23T11:21:34Z","body":"@mickhansen you're right, `persisted` is probably better. waiting for opionions from @janmeier before i update."}}