[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-1951) Table using back-tick not passing validation on Oracle
Diego Pires Plentz (JIRA)
noreply at atlassian.com
Sun Sep 23 15:32:14 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diego Pires Plentz resolved HHH-1951.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Duplicate
> Table using back-tick not passing validation on Oracle
> ------------------------------------------------------
>
> Key: HHH-1951
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1951
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.1.3
> Environment: Client: Hibernate 3.1.3, Java 1.5.0_06, Mac OS X 10.4.7
> Database server: Windows XP SP2, Oracle XE
> Reporter: Matt Solnit
> Assignee: Diego Pires Plentz
>
> I have a table mapping that looks similar to the following:
> <class name="User" table="`User`">
> <!-- etc. -->
> Notice the back-ticks around the table name.
> When I use Hibernate to create the schema for me, it correctly generates a table name called "User" (including the quote marks). But when I validate the schema, it cannot find the table and so validation fails.
> I am thinking the problem is somewhere in org/hibernate/tool/hbm2ddl/DatabaseMetadata.getTableMetadata(). It tries to look for "USER", because OracleDatabaseMetaData.storesUpperCaseIdentifiers() returns true. But the code doesn't realize that quoted tables are a special case and it has to look for "User" instead.
> Another symptom of the same problem is that if I generate a schema update script, it will attempt to re-create the existing table.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list