generateTemporaryTableName in Oracle9Dialect does not truncate well
-------------------------------------------------------------------
Key: HHH-2303
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2303
Project: Hibernate3
Type: Patch
Components: core
Versions: 3.2.0.ga
Environment: Hibernate 3.2, Oracle database
Reporter: Francois Jean
Priority: Minor
Attachments: substring.patch
In "org.hibernate.dialect.Oracle9Dialect" the method used to truncate the
temporary table name removes the first character of the table name. I think that we should
retain the first character. Using "name.substring( 0, 30 )" will return 30
character which should be ok for Oracle.
I propose to change this method:
public String generateTemporaryTableName(String baseTableName) {
String name = super.generateTemporaryTableName(baseTableName);
return name.length() > 30 ? name.substring( 1, 30 ) : name;
}
For:
public String generateTemporaryTableName(String baseTableName) {
String name = super.generateTemporaryTableName(baseTableName);
return name.length() > 30 ? name.substring( 0, 30 ) : name;
}
François J.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira