{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/3570","repository_url":"https://api.github.com/repos/balderdashy/sails","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/3570/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/3570/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/3570/events","html_url":"https://github.com/balderdashy/sails/issues/3570","id":133023769,"number":3570,"title":"Duplicate entries in junction tables","user":{"login":"pedro3900","id":1235919,"avatar_url":"https://avatars.githubusercontent.com/u/1235919?v=3","gravatar_id":"","url":"https://api.github.com/users/pedro3900","html_url":"https://github.com/pedro3900","followers_url":"https://api.github.com/users/pedro3900/followers","following_url":"https://api.github.com/users/pedro3900/following{/other_user}","gists_url":"https://api.github.com/users/pedro3900/gists{/gist_id}","starred_url":"https://api.github.com/users/pedro3900/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedro3900/subscriptions","organizations_url":"https://api.github.com/users/pedro3900/orgs","repos_url":"https://api.github.com/users/pedro3900/repos","events_url":"https://api.github.com/users/pedro3900/events{/privacy}","received_events_url":"https://api.github.com/users/pedro3900/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/balderdashy/sails/labels/more%20info%20please","name":"more info please","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-11T16:41:26Z","updated_at":"2016-02-15T21:52:59Z","closed_at":"2016-02-15T21:52:59Z","body":"Hi,\r\n\r\nI´am using sailsjs, and I have this problem:\r\n\r\nI created 2 model related with a many to many relation, there are any posibility to have duplicated entries in this junction table, example:\r\nSuposed that we have 2 tables 'a' and 'b' related.\r\njuntion table\r\nid  a_b__b_a    b_a__a_b\r\n1          1                 1\r\n2          1                 2\r\n3          1                 2\r\n4          1                 2\r\n5          1                 2\r\n6          1                 2\r\n7          1                 2\r\n8          1                 2\r\n9          1                 2\r\n\r\nI receive this error:\r\n\r\nerr: [Error: Trying to '.add()' an instance which already exists!]"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/184410239","html_url":"https://github.com/balderdashy/sails/issues/3570#issuecomment-184410239","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/3570","id":184410239,"user":{"login":"mikermcneil","id":618009,"avatar_url":"https://avatars.githubusercontent.com/u/618009?v=3","gravatar_id":"","url":"https://api.github.com/users/mikermcneil","html_url":"https://github.com/mikermcneil","followers_url":"https://api.github.com/users/mikermcneil/followers","following_url":"https://api.github.com/users/mikermcneil/following{/other_user}","gists_url":"https://api.github.com/users/mikermcneil/gists{/gist_id}","starred_url":"https://api.github.com/users/mikermcneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikermcneil/subscriptions","organizations_url":"https://api.github.com/users/mikermcneil/orgs","repos_url":"https://api.github.com/users/mikermcneil/repos","events_url":"https://api.github.com/users/mikermcneil/events{/privacy}","received_events_url":"https://api.github.com/users/mikermcneil/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T21:52:59Z","updated_at":"2016-02-15T21:52:59Z","body":"@pedro3900 I'm going to go ahead and close this since it appears to be a duplicate of https://github.com/balderdashy/sails/issues/1647.  If you find that we're wrong and that's not the case, please create a GitHub repo with a Sails app that reproduces this and open a new issue-- we'll take a look asap."}}