We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon on Oracle, double quotes in column names not working

Hi,

I am trying to use Phalcon 2.0.2 on Oracle 12c. I've installed Vokuro application and added debug log for SQL: Here is a raw SQL statement from model:

[Mon, 08 Jun 15 03:46:14 +0000][INFO] INSERT INTO "USERS" ("ID", "NAME", "EMAIL", "PASSWORD", "MUSTCHANGEPASSWORD", "PROFILESID", "BANNED", "SUSPENDED", "ACTIVE") VALUES (null, null, null, null, null, null, null, null, null) The problem is, that most likely Phalcon looks for capitalized propertiesin in Model Users.Otherwise I can not explain why they are all null.

I've tested my hypothesis and renamed column EMAIL in Oracle to "email" in a lowecase. This is a raw SQL for this:

[Mon, 08 Jun 15 04:03:43 +0000][INFO] INSERT INTO "USERS" ("ID", "NAME", "EMAIL", "PASSWORD", "MUSTCHANGEPASSWORD", "PROFILESID", "BANNED", "SUSPENDED", "ACTIVE") VALUES (null, null, ?, null, null, null, null, null, null)

Bind variable appeared, and it means, that hypothesis is right. Now, how can this be fixed?



1.3k
Accepted
answer

I have found a solution through columnMap().