{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/285","repository_url":"https://api.github.com/repos/balderdashy/sails-mysql","labels_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/285/comments","events_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/285/events","html_url":"https://github.com/balderdashy/sails-mysql/issues/285","id":135137575,"number":285,"title":"Associations and foreign keys","user":{"login":"ilo2008","id":16427547,"avatar_url":"https://avatars.githubusercontent.com/u/16427547?v=3","gravatar_id":"","url":"https://api.github.com/users/ilo2008","html_url":"https://github.com/ilo2008","followers_url":"https://api.github.com/users/ilo2008/followers","following_url":"https://api.github.com/users/ilo2008/following{/other_user}","gists_url":"https://api.github.com/users/ilo2008/gists{/gist_id}","starred_url":"https://api.github.com/users/ilo2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilo2008/subscriptions","organizations_url":"https://api.github.com/users/ilo2008/orgs","repos_url":"https://api.github.com/users/ilo2008/repos","events_url":"https://api.github.com/users/ilo2008/events{/privacy}","received_events_url":"https://api.github.com/users/ilo2008/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-21T00:22:32Z","updated_at":"2016-03-28T09:52:01Z","closed_at":null,"body":"Hi,\r\nI tried to create an association as described in this example [http://sailsjs.org/documentation/concepts/models-and-orm/associations/one-to-many], but I noticed that there is no foreign key between pet and user, and that can create a data integrity problem. and when I tried to add the foreign key constraint manually, I noticed that 'pet.owner' is an int(11) while 'user.id' is an int(10) unsigned, so the foreign key constraint can't be created.\r\nWhat do you think about this?"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/comments/202325024","html_url":"https://github.com/balderdashy/sails-mysql/issues/285#issuecomment-202325024","issue_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/285","id":202325024,"user":{"login":"ilo2008","id":16427547,"avatar_url":"https://avatars.githubusercontent.com/u/16427547?v=3","gravatar_id":"","url":"https://api.github.com/users/ilo2008","html_url":"https://github.com/ilo2008","followers_url":"https://api.github.com/users/ilo2008/followers","following_url":"https://api.github.com/users/ilo2008/following{/other_user}","gists_url":"https://api.github.com/users/ilo2008/gists{/gist_id}","starred_url":"https://api.github.com/users/ilo2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilo2008/subscriptions","organizations_url":"https://api.github.com/users/ilo2008/orgs","repos_url":"https://api.github.com/users/ilo2008/repos","events_url":"https://api.github.com/users/ilo2008/events{/privacy}","received_events_url":"https://api.github.com/users/ilo2008/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T09:52:01Z","updated_at":"2016-03-28T09:52:01Z","body":"I confirm\n\nOn 25 March 2016 at 23:43, Claudius Coenen <notifications@github.com> wrote:\n\n> The original issue is still open, and i'd consider a foreign key at least\n> an enhancement. Some people might even consider the lack of the FK a bug.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/balderdashy/sails-mysql/issues/285#issuecomment-201590755>\n>\n\n\n\n-- \n*الشعر أنا، وأنا الشعر*\n"}}