Hi!

I'm having a problem with OJB with a table of Jabber. The table name is roster-items and is on a PostgreSQL server.

When I try to store() an object (using the PB api) I get this log:

[org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl]
  DEBUG: SQL:INSERT INTO roster-items
    (collection-owner,jid,ask,from,name,object-sequence,to)
    VALUES (?,?,?,?,?,?,?)

and this exception:

org.apache.ojb.broker.PersistenceBrokerSQLException:
   SQL failure while insert object data for class
   JabberRosterItem (...)
   exception message is [ERROR: syntax error at or near "-"]

I think Ojb has troubles with the table name. If I execute this on psql:

SELECT * FROM roster-items;

I get this error:

jabberd2=# SELECT * FROM roster-items;
ERROR:  syntax error at or near "-" at character 21

The valid SQL for viewing the roster-items table is:

SELECT * FROM "roster-items";

The same happen with ANY table containing the '-' character, and this is fixed if you put the table name between double quotes...

Is there any way to make Ojb put the table name between double quotes?

Thanks in advance!

Horacio

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to