Yii and its Active Record definitions !

Hi all.

How can I deal with multiple schema database (obviously with simplicity) ?

In the Prado's way, a simple constant valued with the name of the database table name (preceeded or not with the schema name) is the simplest way.

Something like this:



class Usuario extends TActiveRecord



	const TABLE = 'corporativo.tb_usuario';	

schema<-----------------|            |



And into YII AR cuture, how can we do it ?



Specify it in tableName() method.

Bingo !

Thanks qiang !

I take the opportunity to suggest that it is removed (or changed its location) the example "Connecting to Database …" to the chapter "Creating First Yii Application". A novice reader does not understand the framework enough to reading or viewing the DB handling nor AR, Auth, etc.