Jump to content
Larry Ullman's Book Forums

Gii Model Generator Shows Only 1 Of 5 Tables For Yii_Cms


KeepLearning
 Share

Recommended Posts

How can I get all the tables to appear when generating models in Chapter 4? (p 71, version 0.5)

 

When I click the Preview button, the Model Generator shows just one table. In contrast, the book shows 5 tables. How can I get all 5 tables to appear in the Model Generator list?

 

More info: When I open the database in the MyPhpAdmin Designer view, I can see all 5 tables -- and their relationships -- so I know they exist. (I can also see 3 other tables, all starting with "auth".)

 

 

My yiicdemo files are here: D:\xampp\htdocs\yiicdemo
 
My framework folder is here: D:\xampp\framework
 
The Code Template dropdown shows this:
default (D:\xampp\framework\gii\generators\model\templates\default)
 
The Code File list shows only one table:
models\TblUser.php
 
Thanks.
 

 

 

 

 

 

 

 

Link to comment
Share on other sites

I've solved the problem myself (blush).

 

I realized that I had not uncommented "'db'=>array" etc in main.php

 

But now I see the following 8 files, not just the 5 shown in the book: 

 

 

Authassignment.php    
Authitem.php    
Authitemchild.php    
Comment.php    
File.php    
Page.php    
PageHasFile.php    
User.php
 
Is it okay to generate code for all of these files?
 
Thanks.
Link to comment
Share on other sites

 Share

×
×
  • Create New...