{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/122","labels_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/122/comments","events_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/122/events","html_url":"https://github.com/yiisoft/yii2-gii/issues/122","id":125740781,"number":122,"title":"Have you considered seperating the one model to be generated into one model and one relation trait.","user":{"login":"vistart","id":864657,"avatar_url":"https://avatars.githubusercontent.com/u/864657?v=3","gravatar_id":"","url":"https://api.github.com/users/vistart","html_url":"https://github.com/vistart","followers_url":"https://api.github.com/users/vistart/followers","following_url":"https://api.github.com/users/vistart/following{/other_user}","gists_url":"https://api.github.com/users/vistart/gists{/gist_id}","starred_url":"https://api.github.com/users/vistart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vistart/subscriptions","organizations_url":"https://api.github.com/users/vistart/orgs","repos_url":"https://api.github.com/users/vistart/repos","events_url":"https://api.github.com/users/vistart/events{/privacy}","received_events_url":"https://api.github.com/users/vistart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-09T05:57:29Z","updated_at":"2016-01-09T16:27:36Z","closed_at":null,"body":"If current table contains foreign key references, or any fields referenced from other table fields, the model generator will generate \"Relations\" (`get<ModelName>()` methods) at the bottom of body of current model class to be generated.\r\nHave you considered extracting the \"Relations\" into a seperated trait, such as named `<ModelName>RelationTrait`?\r\nIf only to add foreign key references without modifying column definitions of table each time, if do so, then will generate new RelationTrait, without modifying model."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/comments/170257728","html_url":"https://github.com/yiisoft/yii2-gii/issues/122#issuecomment-170257728","issue_url":"https://api.github.com/repos/yiisoft/yii2-gii/issues/122","id":170257728,"user":{"login":"vistart","id":864657,"avatar_url":"https://avatars.githubusercontent.com/u/864657?v=3","gravatar_id":"","url":"https://api.github.com/users/vistart","html_url":"https://github.com/vistart","followers_url":"https://api.github.com/users/vistart/followers","following_url":"https://api.github.com/users/vistart/following{/other_user}","gists_url":"https://api.github.com/users/vistart/gists{/gist_id}","starred_url":"https://api.github.com/users/vistart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vistart/subscriptions","organizations_url":"https://api.github.com/users/vistart/orgs","repos_url":"https://api.github.com/users/vistart/repos","events_url":"https://api.github.com/users/vistart/events{/privacy}","received_events_url":"https://api.github.com/users/vistart/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T16:27:36Z","updated_at":"2016-01-09T16:27:36Z","body":"Maybe a model contains more than dozens of relations. The relations and rules are responsible for different developers (File-centric) . To prevent more than one developer to modify the same file, the leader would divide the generated model into model with definition and trait with relations in advanced， and then assign them to the developer in charge of each file."}}