multiple databases and gii

Hi,

following the wiki article of mdomba:

http://www.yiiframework.com/wiki/78/multiple-databases-and-multiple-domains

I’ve configured a second db in main config file and put an extended ActiveRecord Class in protected/components

so I’ve tryed to create a new model with Gii but it always return the following error message:

Table ‘xxxxxx’ does not exist.

anybody knows how to do?

the easy way without modifying the core is to temporarily change the connection string




'db'=>array(

			'connectionString' => 'mysql:host=localhost;dbname=teste',//here

			'username' => 'user',

			'password' => 'pw',

			'charset' => 'utf8',

		),



in library/gii/model/modelCode.php line 139




return Yii::app()->db->getSchema()->getTable($tableName);



it uses the db connection

thank you,

usefull trick.