Generating code from sql schema

I have a rather large database with dozens of tables, one-one, one-to-many, many-to-one relationships. Is it possible to auto generate classes / code for this using gii or some other method?



using gii just input * in the table name entry and it should create all the models for you.

If you want to created Crud functionality you will have to give the models into the crud generator one by one (or you could just hack framework/gii/generators/crud/ to do the things you want)