I\'m new to Yii here. In the documentation, it seems to imply that gii will create the relations for related models. But when using gii to generate models from DB, it doesn\
Gii can automatically create relations for generated models if corresponding tables in your DB have foreign keys, but not all storage engines support foreign keys. For example, if you use MyISAM tables in MySQL, you have no way to define it.