{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback.io/issues/209","repository_url":"https://api.github.com/repos/strongloop/loopback.io","labels_url":"https://api.github.com/repos/strongloop/loopback.io/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback.io/issues/209/comments","events_url":"https://api.github.com/repos/strongloop/loopback.io/issues/209/events","html_url":"https://github.com/strongloop/loopback.io/issues/209","id":196629174,"number":209,"title":"Relations: hasMany bugs: Forces to change foreignKey to integer","user":{"login":"tmclouisluk","id":18186155,"avatar_url":"https://avatars.githubusercontent.com/u/18186155?v=3","gravatar_id":"","url":"https://api.github.com/users/tmclouisluk","html_url":"https://github.com/tmclouisluk","followers_url":"https://api.github.com/users/tmclouisluk/followers","following_url":"https://api.github.com/users/tmclouisluk/following{/other_user}","gists_url":"https://api.github.com/users/tmclouisluk/gists{/gist_id}","starred_url":"https://api.github.com/users/tmclouisluk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmclouisluk/subscriptions","organizations_url":"https://api.github.com/users/tmclouisluk/orgs","repos_url":"https://api.github.com/users/tmclouisluk/repos","events_url":"https://api.github.com/users/tmclouisluk/events{/privacy}","received_events_url":"https://api.github.com/users/tmclouisluk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-20T09:52:31Z","updated_at":"2016-12-20T19:43:02Z","closed_at":null,"body":"Table A:\r\n```\r\n\"s_id\": {\r\n      \"type\": \"String\",\r\n\t  \"id\": false,\r\n      \"required\": false,\r\n      \"length\": null,\r\n      \"precision\": null,\r\n      \"scale\": null,\r\n      \"postgresql\": {\r\n        \"columnName\": \"s_id\",\r\n        \"dataType\": \"character varying\",\r\n        \"dataLength\": null,\r\n        \"dataPrecision\": null,\r\n        \"dataScale\": null,\r\n        \"nullable\": \"YES\"\r\n      }\r\n    }\r\n```\r\n\r\nTable B\r\n```\r\n\"relations\": {\r\n\t\"A\": {\r\n      \"type\": \"hasMany\",\r\n      \"model\": \"A\",\r\n      \"foreignKey\": \"s_id\"\r\n    }\r\n  }\r\n```\r\nFor table A, s_id is uuid so it should be in string.\r\nwhen I go to http://localhost:3000/explorer,\r\ni found that loopback forces to change the datatype of id in table A from string to integer.\r\n\r\nIs there any solution for this?"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback.io/issues/comments/268338789","html_url":"https://github.com/strongloop/loopback.io/issues/209#issuecomment-268338789","issue_url":"https://api.github.com/repos/strongloop/loopback.io/issues/209","id":268338789,"user":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T19:43:02Z","updated_at":"2016-12-20T19:43:02Z","body":"Please post on strongloop/loopback -- I'll help move this issue there."}}
{"actor":{"display_login":"superkhau"}}