ID column name is not upper case when using ORMLite with Oracle

88 views
Skip to first unread message

Xin Zhou

unread,
May 22, 2013, 8:10:38 PM5/22/13
to ormlit...@googlegroups.com
I'm using the latest ORMLite to query against Oracle database. I create all DAOs in Spring and have @DatabaseField(id = true) annotation for my key field. In Spring configuration my JDBC url is like jdbc:oracle....
But when I execute my query by queryById or queryForEq etc ORMLite always try to use the column name with lower case which defined in my entity class, so that Oracle doesn't like it and throws an exception (ORA-00904: "id": invalid identifier). Anyone knows the solution?

Gray Watson

unread,
May 24, 2013, 8:15:43 PM5/24/13
to ormlit...@googlegroups.com
On May 22, 2013, at 8:10 PM, Xin Zhou <xzho...@gmail.com> wrote:

> I'm using the latest ORMLite to query against Oracle database. I create all DAOs in Spring and have @DatabaseField(id = true) annotation for my key field. In Spring configuration my JDBC url is like jdbc:oracle....
> But when I execute my query by queryById or queryForEq etc ORMLite always try to use the column name with lower case which defined in my entity class, so that Oracle doesn't like it and throws an exception (ORA-00904: "id": invalid identifier). Anyone knows the solution?

What version of ORMLite are you using? Some improvements to the Oracle database type were made in 4.42 including up-casing all entity names.

Make sure you are running a more recent version.

gray

Reply all
Reply to author
Forward
0 new messages