diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java index 4564c416b..c6b16feba 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java @@ -144,7 +144,7 @@ public class SchemaGroup tab.importIndex(idxs[j]); unqs = tables[i].getUniques(); for (int j = 0; j < unqs.length; j++) - tab.importUnique(unqs[j]); + tab.importUnique(unqs[j], null); } return copy; } diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java index c3c364a80..04a7d79e3 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java @@ -590,7 +590,7 @@ public class SchemaTool { if (dbTable == null) continue; for (int k = 0; k < uniques.length; k++) { - dbTable.importUnique(uniques[k]); + dbTable.importUnique(uniques[k], _dict); } } } @@ -957,7 +957,11 @@ public class SchemaTool { */ public boolean createTable(Table table) throws SQLException { - return executeSQL(_dict.getCreateTableSQL(table)); + try { + return executeSQL(_dict.getCreateTableSQL(table)); + } catch (SQLException e) { + return false; + } } /**