Has anyone encountered a bug with table names using the PostgreSQL adapter in ZF2?
I have a column named UserId and when I try to update/delete a row based on this I get this error:
ERROR: column 'userid' does not exist
as opposed to UserId
.
This is my code:
$delete = $this->delete(
'Users'
, array(
'UserId = ?' => $UserId
)
);
Might have something to do with autoQuoteIdentifiers
but I couldn't find much online about it.
Any ideas?
问题在于,驼峰式列名需要用双引号引起来,因此数组应为:
array('"UserId" = ?' => $UserId)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.