[Solved] Issues With Using Both A Mysql And A Sqlite Connection

I have been using two MySQL connections for my app, and it’s been working fine. I used something like this when setting it up: http://www.yiiframework.com/wiki/123/multiple-database-support-in-yii/

However, I am now trying to switch the main “db” component from MySQL to SQLite, and found that when creating a relation on the MySQL “db2”, the relational table names are quoted with SQLite style ’ character instead of MySQL style ` character.

If anyone could point me in the right direction, that would be great.

I thught I found the problem. CActiveFinder, line 220:


$model=CActiveRecord::model($relation->className);

However, I realised the relation was extending CActiveRecord as well, as it’s a central component and needs to be used by both connections. Obviosuly that doesn’t work so I made a copy and had it extend MyActiveRecord, and that worked.