Gii Model Generation - Generate as Base Classes?

I love the code generation that Gii offers, but have a couple questions.

  1. In an agile workflow I might change my data schema several times on the same table. Would it be good policy to have Gii generate a base class [UserBase] and then inherit from that class [User] so that I can have Gii pave and recreate the base class without losing any of my domain logic? Are there any major drawbacks with this approach?



class User extends UserBase

{

	public static function model($className=__CLASS__)

	{

		return parent::model($className);

	}

	

	public function OtherFunctionality()

	{

	}	

}



  1. Is there a way to run Gii against all tables or a list of tables in the database instead of one at a time?

Just started with Yii and really like what it has to offer. My apologies if these questions are covered somewhere, but I wasn’t able to find it.

  1. Looks OK but not for relatively small apps.

  2. Use *.

I’ve altered ModelCode.php and the associated index to add “Class Suffix” so that you can optionally generate a class suffix for each item. How do I get this to the Yii developers and give back to the community?

I added a patch to google code, issue 2064.

I’m not allowed to link yet. Isn’t that just great?

Thanks for contribution. Will check it.

On large projects db changes occur quite frequently, by using base files you can update models on demand without blowing out the customized business logic.

A brilliant and important capability for large projects! Thanks to woil for implementing it, hopefully the patch gets accepted.