{"action":"opened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/4449","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/4449/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/4449/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/4449/events","html_url":"https://github.com/sequelize/sequelize/issues/4449","id":105233873,"number":4449,"title":"hasMany - set is not inserting","user":{"login":"fabriciocs","id":5154393,"avatar_url":"https://avatars.githubusercontent.com/u/5154393?v=3","gravatar_id":"","url":"https://api.github.com/users/fabriciocs","html_url":"https://github.com/fabriciocs","followers_url":"https://api.github.com/users/fabriciocs/followers","following_url":"https://api.github.com/users/fabriciocs/following{/other_user}","gists_url":"https://api.github.com/users/fabriciocs/gists{/gist_id}","starred_url":"https://api.github.com/users/fabriciocs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabriciocs/subscriptions","organizations_url":"https://api.github.com/users/fabriciocs/orgs","repos_url":"https://api.github.com/users/fabriciocs/repos","events_url":"https://api.github.com/users/fabriciocs/events{/privacy}","received_events_url":"https://api.github.com/users/fabriciocs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-07T15:15:30Z","updated_at":"2015-09-07T15:15:30Z","closed_at":null,"body":"I have the code below:\r\n```javascript\r\nreturn usr.setEmpresas(empresas,{transaction: t}).then(function (empresas) {\r\n                        return usr.setGruposPermissao(permissoes, {transaction: t}).then(function () {\r\n                            return usr.setSupervisionados(usuario.supervisionados);\r\n                        });\r\n                    });\r\n```\r\n\r\nbut, the usr.setSupervisionados is not inserting, but doing an update.\r\n\r\nthe console shows it:\r\n\r\n```javascript\r\n UPDATE `sis_usuariovinculo` SET `usr_codigoSupervisor`=44 WHERE `usrvncl_codigo` IN (`usrvncl_data` = '2015-09-07T03:00:00.000Z', `usr_codigoSupervisionado` = 31, `usr_codigoSupervisor` = 44)\r\n```"}}