开发者

mySQL vs. sqlite alias incompatible?

开发者 https://www.devze.com 2023-03-27 18:21 出处:网络
I use Yii framework with mySQL with an ORM. When I switch to sqlite, I 开发者_StackOverflow中文版suddenly get \'column not found\' errors for columns that have aliases in their query:

I use Yii framework with mySQL with an ORM. When I switch to sqlite, I 开发者_StackOverflow中文版suddenly get 'column not found' errors for columns that have aliases in their query:

Querying SQL: SELECT `privateAccesses`.`project_id` AS `t1_c0`, ... FROM `project` `privateAccesses`

Then I get:

CDbException: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 no such column: privateAccesses

So I think it has something to do with aliases.. anyone know if the mySQL/sqlite aliases are somehow incompatible? Idea how to fix this? Basic aliases seem to work in sqlite..

Thanks, MrB


Forget it, it's something about the ORM omitting certain columns on sqlite for some reason..

0

精彩评论

暂无评论...
验证码 换一张
取 消