mirror of https://github.com/apache/openjpa.git
OPENJPA-399. Committing Teresa's most recent patch for this Issue. Should be ready for resolution now.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@585774 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aca5f3351d
commit
a20d36c121
|
@ -819,8 +819,10 @@ public class SchemaGenerator {
|
|||
if (_log.isTraceEnabled())
|
||||
_log.trace(_loc.get("gen-seqs", schemaName, sequenceName));
|
||||
|
||||
// since all the sequences are generated under the default schema
|
||||
// therefore, we can use the null schemaname to search
|
||||
Sequence[] seqs = _dict.getSequences(meta, conn.getCatalog(),
|
||||
schemaName, sequenceName, conn);
|
||||
null, sequenceName, conn);
|
||||
|
||||
SchemaGroup group = getSchemaGroup();
|
||||
Schema schema;
|
||||
|
|
|
@ -94,7 +94,7 @@ public class DB2Dictionary
|
|||
"LONG VARCHAR FOR BIT DATA", "LONG VARCHAR", "LONG VARGRAPHIC",
|
||||
}));
|
||||
systemSchemas = new String(
|
||||
"SYSCAT, SYSIBM, SYSSTAT, SYSIBMADM, SYSTOOLS");
|
||||
"SYSCAT,SYSIBM,SYSSTAT,SYSIBMADM,SYSTOOLS");
|
||||
maxConstraintNameLength = 18;
|
||||
maxIndexNameLength = 18;
|
||||
maxColumnNameLength = 30;
|
||||
|
|
|
@ -3364,7 +3364,7 @@ public class DBDictionary
|
|||
try {
|
||||
int idx = 1;
|
||||
if (schemaName != null)
|
||||
stmnt.setString(idx++, schemaName);
|
||||
stmnt.setString(idx++, schemaName.toUpperCase());
|
||||
if (sequenceName != null)
|
||||
stmnt.setString(idx++, sequenceName);
|
||||
|
||||
|
@ -3708,13 +3708,21 @@ public class DBDictionary
|
|||
if (objectName == null)
|
||||
return null;
|
||||
|
||||
if (SCHEMA_CASE_LOWER.equals(schemaCase))
|
||||
String scase = getSchemaCase();
|
||||
if (SCHEMA_CASE_LOWER.equals(scase))
|
||||
return objectName.toLowerCase();
|
||||
if (SCHEMA_CASE_PRESERVE.equals(schemaCase))
|
||||
if (SCHEMA_CASE_PRESERVE.equals(scase))
|
||||
return objectName;
|
||||
return objectName.toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return DB specific schemaCase
|
||||
*/
|
||||
public String getSchemaCase(){
|
||||
return schemaCase;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepared the connection for metadata operations.
|
||||
*/
|
||||
|
|
|
@ -42,6 +42,7 @@ public class SQLServerDictionary
|
|||
private static final Localizer _loc = Localizer.forPackage
|
||||
(SQLServerDictionary.class);
|
||||
|
||||
private String schemaCase = SCHEMA_CASE_PRESERVE;
|
||||
/**
|
||||
* Flag whether to treat UNIQUEIDENTIFIER as VARBINARY or VARCHAR
|
||||
*/
|
||||
|
@ -230,4 +231,11 @@ public class SQLServerDictionary
|
|||
appendLength(buf, type);
|
||||
buf.append("')");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return DB specific schemaCase
|
||||
*/
|
||||
public String getSchemaCase() {
|
||||
return schemaCase;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue