mirror of https://github.com/apache/openjpa.git
OPENJPA-629 trim schema name for Informix only.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@665801 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ffbc73ffa6
commit
a4d905f345
|
@ -756,8 +756,10 @@ public class SchemaGenerator {
|
|||
seq++;
|
||||
|
||||
// find pk table
|
||||
pkSchemaName =
|
||||
StringUtils.trimToNull(fks[i].getPrimaryKeySchemaName());
|
||||
pkSchemaName = fks[i].getPrimaryKeySchemaName();
|
||||
if(_dict.getTrimSchemaName()) {
|
||||
pkSchemaName= StringUtils.trimToNull(pkSchemaName);
|
||||
}
|
||||
pkTableName = fks[i].getPrimaryKeyTableName();
|
||||
if (_log.isTraceEnabled())
|
||||
_log.trace(_loc.get("gen-fk", new Object[]{ name, table,
|
||||
|
|
|
@ -237,6 +237,11 @@ public class DBDictionary
|
|||
public boolean supportsModOperator = false;
|
||||
public boolean supportsXMLColumn = false;
|
||||
public boolean reportsSuccessNoInfoOnBatchUpdates = false;
|
||||
|
||||
/**
|
||||
* Some Databases append whitespace after the schema name
|
||||
*/
|
||||
public boolean trimSchemaName = false;
|
||||
|
||||
// functions
|
||||
public String castFunction = "CAST({0} AS {1})";
|
||||
|
@ -4438,4 +4443,12 @@ public class DBDictionary
|
|||
public int getBatchUpdateCount(PreparedStatement ps) throws SQLException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean getTrimSchemaName() {
|
||||
return trimSchemaName;
|
||||
}
|
||||
|
||||
public void setTrimSchemaName(boolean trimSchemaName) {
|
||||
this.trimSchemaName = trimSchemaName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,6 +148,8 @@ public class InformixDictionary
|
|||
// Informix does not support foreign key delete action NULL or DEFAULT
|
||||
supportsNullDeleteAction = false;
|
||||
supportsDefaultDeleteAction = false;
|
||||
|
||||
trimSchemaName = true;
|
||||
}
|
||||
|
||||
public void connectedConfiguration(Connection conn)
|
||||
|
|
Loading…
Reference in New Issue