{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/4738","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/4738/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/4738/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/4738/events","html_url":"https://github.com/cakephp/cakephp/issues/4738","id":44006089,"number":4738,"title":"3.0 - RFC - Don't singularlize table name in foreignkey field names","user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/RFC","name":"RFC","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/2","html_url":"https://github.com/cakephp/cakephp/milestones/Future","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/2/labels","id":453023,"number":2,"title":"Future","description":null,"creator":{"login":"lh-import","id":5175817,"avatar_url":"https://avatars.githubusercontent.com/u/5175817?v=3","gravatar_id":"","url":"https://api.github.com/users/lh-import","html_url":"https://github.com/lh-import","followers_url":"https://api.github.com/users/lh-import/followers","following_url":"https://api.github.com/users/lh-import/following{/other_user}","gists_url":"https://api.github.com/users/lh-import/gists{/gist_id}","starred_url":"https://api.github.com/users/lh-import/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lh-import/subscriptions","organizations_url":"https://api.github.com/users/lh-import/orgs","repos_url":"https://api.github.com/users/lh-import/repos","events_url":"https://api.github.com/users/lh-import/events{/privacy}","received_events_url":"https://api.github.com/users/lh-import/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":237,"state":"open","created_at":"2013-10-11T20:37:33Z","updated_at":"2015-03-04T09:52:10Z","due_on":null,"closed_at":null},"comments":22,"created_at":"2014-09-26T06:05:18Z","updated_at":"2015-03-06T15:13:46Z","closed_at":"2014-09-29T04:01:34Z","body":"Since our tables names and now even model names are plural it would be simpler if we use convention for foreignkeys where just \"_id\" is appended to the table name instead of singularizing it first. This would save us few extra inflections in code and make conventions easier to remember for new users.\r\n\r\nTL;DR; Use foreignkey field names like `users_id` instead of `user_id`."},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/77574342","html_url":"https://github.com/cakephp/cakephp/issues/4738#issuecomment-77574342","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/4738","id":77574342,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T15:13:46Z","updated_at":"2015-03-06T15:13:46Z","body":"> MySQL Workbench does use `SINGULAR-TABLE-NAME_id` as the default (...) So I'd not be too sure about general conventions. \r\n\r\nerm, but that's what I suggested, *keep* it `singular_id` (i.e. `user_id`)? Which is also the current convention?"}}