SQLite PRAGMA table_info schema prefix

Hello,

I am receiving the following error while using an sqlite database. The error does not occur while using a MySQL database. It is:

CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 near “.”: syntax error. The SQL statement executed was: PRAGMA table_info(‘main_db’.‘Organization’)

The line of code throwing this error is:

$user = UserAccount::model()->with(‘organization’)->findAll();

When I run the query manually, without the schema prefix, it executes successfully, as does a manual query which joins the User to Organization. Also, the line executes successfully when the with() clause is left off.

As background, I’m using NestedPDO class (which when removed, does not change the Excpetion). Also, the Organization table is part of a master database used to lookup user information, which then directs the system to use a database associated with the organization for organization-specific information. The getDBConnection() is overridden in the model class for both tables.

Any ideas?

Thanks.

config/main.php:


		'db'=>array(

			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/db.sqlite',

			'charset' => 'utf8',

			'tablePrefix' => 'tbl_',

                        'initSQLs'=>array(

                              'PRAGMA foreign_keys = ON',

                         ),

		),