OPENJPA-1387: Remove non-nullable constraint from Unique column.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@880868 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2009-11-16 17:38:16 +00:00
parent 69d2415b57
commit 5143d0cafd
2 changed files with 7 additions and 3 deletions

View File

@ -144,7 +144,7 @@ public class SchemaGroup
tab.importIndex(idxs[j]); tab.importIndex(idxs[j]);
unqs = tables[i].getUniques(); unqs = tables[i].getUniques();
for (int j = 0; j < unqs.length; j++) for (int j = 0; j < unqs.length; j++)
tab.importUnique(unqs[j]); tab.importUnique(unqs[j], null);
} }
return copy; return copy;
} }

View File

@ -590,7 +590,7 @@ public class SchemaTool {
if (dbTable == null) if (dbTable == null)
continue; continue;
for (int k = 0; k < uniques.length; k++) { 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) public boolean createTable(Table table)
throws SQLException { throws SQLException {
return executeSQL(_dict.getCreateTableSQL(table)); try {
return executeSQL(_dict.getCreateTableSQL(table));
} catch (SQLException e) {
return false;
}
} }
/** /**