hi horacio, i'm currently working on quoting of tables and columns for ojb-1.1. ojb will have it's own quoting character. this character is replaced by the dbms-specific character when building the sql, and stripped when reading from result set. i already checked in parts of the solution, but i need additional time. i'll drop you mail as soon as i have it finished.
jakob > 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] > -- Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD ++ Jetzt kostenlos testen http://www.gmx.net/de/go/mail ++ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
