[odb-users] ODB compiler for oracle, double qoutes SQL?statements

Boris Kolpackov boris at codesynthesis.com
Tue Nov 20 08:48:56 EST 2012

Hi Magnus,

Magnus Granqvist <magnus.granqvist at tailormade.se> writes:

> But I think I see why this is happening now, the table must be created
> with quotes to support the SQL.

Yes, in other words, the tables were created without quoting and Oracle
uppercased them.

> This could be a problem developing for existing production databases
> that is not created with qoutes
> CREATE TABLE "dagsmproduct" (
>   "oidval" RAW(16),
>   "msisdn" VARCHAR2(512) NOT NULL PRIMARY KEY);

In this case it is probably best to assign custom table/column names
that correspond exactly to the existing names. This way, also, you
can use more descriptive C++ names that follow your naming convention.
For example:

#pragma db object table("DAGSMPRODUCT")
class DagSmProduct

  #pragma db type("RAW(16)") column("OIDVAL")
  char oid_val[16];

  #pragma db id column("MSISDN")
  std::string ms_isdn;


More information about the odb-users mailing list