mirror of
https://github.com/apache/openjpa.git
synced 2025-03-08 17:49:18 +00:00
OPENJPA-1605 Correct regression issue with table generation issue in schema generator. Only the first table name returned in a generic DBMD query was used to populate the schema. This broke the reverse mapping tool, which uses a generic query by default.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@934493 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cdc597a26b
commit
5de5b5136f
@ -572,9 +572,12 @@ public class SchemaGenerator {
|
||||
Schema schema;
|
||||
Table table;
|
||||
DBIdentifier tableSchema = DBIdentifier.NULL;
|
||||
DBIdentifier baseTableName = (tableName == null) ? DBIdentifier.NULL : tableName.clone();
|
||||
for (int i = 0; cols != null && i < cols.length; i++) {
|
||||
if (DBIdentifier.isNull(tableName) || tableName.equals("%")) {
|
||||
if (DBIdentifier.isNull(baseTableName) || baseTableName.equals("%")) {
|
||||
tableName = cols[i].getTableIdentifier();
|
||||
} else {
|
||||
tableName = baseTableName;
|
||||
}
|
||||
if (DBIdentifier.isNull(schemaName)) {
|
||||
tableSchema = DBIdentifier.trimToNull(cols[i].getSchemaIdentifier());
|
||||
|
Loading…
x
Reference in New Issue
Block a user