Table names with quotes in SQL statements are not accepted
----------------------------------------------------------
Key: SEQUOIA-976
URL: https://forge.continuent.org/jira/browse/SEQUOIA-976
Project: Sequoia
Type: Bug
Components: JDBC Driver
Versions: Sequoia 2.9
Environment: Sequoia 2.9.10
PostgreSQL 8.1.9
Java 1.5
Jbos 4.0.5
Suse Enterprise Server 10
Reporter: Juan Olmedilla
I have a table named "User" in my schema, my application accesses it without
any problems when using direct access to PostgreSQL through its own jdbc
driver. I have taken care to use quotes around the table name in the EJB3
annotation. In the EJB3 annotation I use single quotes which are translated to
double quotes to the jdbc driver. The word "user" is reserved in PostgreSQL and
that's why I use quotes for "User" in all SQL statements (well, the EJB3
translation does for me).
All works correct until I use Sequoia, which throws the following exception:
Caused by: java.sql.BatchUpdateException: Batch failed for request 0: insert
into "User" (name, dni, lastName, telephoneNumber, active, principal_id, id)
values (?, ?, ?, ?, ?, ?, ?)
(org.continuent.sequoia.common.exceptions.driver.DriverSQLException: Message of
cause: Unknown table '"user"' in this INSERT statement: 'insert into "User"
(name, dni, lastName, telephoneNumber, active, principal_id, id) values (?, ?,
?, ?, ?, ?, ?)')
at
org.continuent.sequoia.driver.PreparedStatement.executeBatch(PreparedStatement.java:1023)
at
org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:519)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
... 76 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia