I’m back on Yii after a long break, and I see that there is a new code generator Gii. I’ve generated a module - but there doesn’t seem to be an option to generate models etc within that module. Do I have to generate a model using Gii, then copy it to the appropriate place in the module previously created?
I tried the “Model Path” field and it works as long as the database is set up in the site’s config/main.php file as ‘db’.
The problem I have is that most of my Modules have their own database and it’s set up in the CWebModule’s init method with something like the following:
There is no way to tell gii which database component to use. The only way I know to get around it for now is to copy the db_module array into config/main.php and rename it to ‘db’
It would be nice to be able to direct gii to a different database component.
I don’t post here often (I even forgot my last username… ha…) so I just want to take this time to say “Thanks!” for all your hard work on this incredible framework. I’ve been using it for quite a while now and written several sites with it. It’s the best!