Author: max.andersen(a)jboss.com
Date: 2006-11-03 08:22:57 -0500 (Fri, 03 Nov 2006)
New Revision: 10703
Modified:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java
Log:
use db metadata to decide proper casing (also for quotes)
Modified:
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java
===================================================================
---
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java 2006-11-03
13:19:20 UTC (rev 10702)
+++
branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java 2006-11-03
13:22:57 UTC (rev 10703)
@@ -145,11 +145,17 @@
protected String caseForSearch(String value) throws SQLException {
// TODO: handle quoted requests (just strip it ?)
if(needQuote(value)) {
- return value;
+ if ( getMetaData().storesUpperCaseQuotedIdentifiers() ) {
+ return StringHelper.toUpperCase( value );
+ } else if( getMetaData().storesLowerCaseQuotedIdentifiers() ) {
+ return StringHelper.toLowerCase( value );
+ } else {
+ return value;
+ }
}
if ( getMetaData().storesUpperCaseIdentifiers() ) {
return StringHelper.toUpperCase( value );
- } else if( getMetaData().storesUpperCaseIdentifiers() ) {
+ } else if( getMetaData().storesLowerCaseIdentifiers() ) {
return StringHelper.toLowerCase( value );
} else {
return value;
Show replies by date