{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/116","labels_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/116/comments","events_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/116/events","html_url":"https://github.com/yiisoft/yii2-gii/issues/116","id":123101020,"number":116,"title":"Problems with table prefix in Model Class","user":{"login":"umanamente","id":10637425,"avatar_url":"https://avatars.githubusercontent.com/u/10637425?v=3","gravatar_id":"","url":"https://api.github.com/users/umanamente","html_url":"https://github.com/umanamente","followers_url":"https://api.github.com/users/umanamente/followers","following_url":"https://api.github.com/users/umanamente/following{/other_user}","gists_url":"https://api.github.com/users/umanamente/gists{/gist_id}","starred_url":"https://api.github.com/users/umanamente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umanamente/subscriptions","organizations_url":"https://api.github.com/users/umanamente/orgs","repos_url":"https://api.github.com/users/umanamente/repos","events_url":"https://api.github.com/users/umanamente/events{/privacy}","received_events_url":"https://api.github.com/users/umanamente/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2-gii/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-19T17:52:55Z","updated_at":"2015-12-20T08:51:16Z","closed_at":"2015-12-20T08:36:21Z","body":"I am using table prefixes and have for example 2 tables connected with foreign keys:\r\n\r\n     pref_pages\r\n     pref_comments . pageid\r\n\r\nWhen I generate models for that tables, **Model Class** fields are generated like `PrefComments` instead of `Comments`. It will be great to remove table prefix from the autogenerated **Model Class** field, because if there are relations, related models classes are generated without prefix (`Pages::className()` instead of `PrefPages::className()`):\r\n\r\n    public function getPage()\r\n\t\t   {\r\n\t\t       return $this->hasOne(Pages::className(), ['pageid' => 'pageid']);\r\n\t\t   }\r\n \r\nSo I need to edit it manually."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/comments/166086550","html_url":"https://github.com/yiisoft/yii2-gii/issues/116#issuecomment-166086550","issue_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/116","id":166086550,"user":{"login":"umanamente","id":10637425,"avatar_url":"https://avatars.githubusercontent.com/u/10637425?v=3","gravatar_id":"","url":"https://api.github.com/users/umanamente","html_url":"https://github.com/umanamente","followers_url":"https://api.github.com/users/umanamente/followers","following_url":"https://api.github.com/users/umanamente/following{/other_user}","gists_url":"https://api.github.com/users/umanamente/gists{/gist_id}","starred_url":"https://api.github.com/users/umanamente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umanamente/subscriptions","organizations_url":"https://api.github.com/users/umanamente/orgs","repos_url":"https://api.github.com/users/umanamente/repos","events_url":"https://api.github.com/users/umanamente/events{/privacy}","received_events_url":"https://api.github.com/users/umanamente/received_events","type":"User","site_admin":false},"created_at":"2015-12-20T08:51:16Z","updated_at":"2015-12-20T08:51:16Z","body":"Already existed, that doesn't change anything. Check [/assets/gii.js](https://github.com/yiisoft/yii2-gii/blob/177847f7b4ed07698a42d1e5f01bc792871210fb/assets/gii.js#L202-L212), there are no `tablePrefix` used in there."}}