Handle null uniqueColumns.

This commit is contained in:
Michael Bayne
2014-05-02 13:13:11 -07:00
parent d870dd2fac
commit 4efae53621
@@ -129,11 +129,13 @@ public class HsqldbLiaison extends BaseLiaison
// note the set of single column unique constraints already provided (see method comment)
Set<String> seenUniques = new HashSet<String>();
if (uniqueColumns != null) {
for (List<String> udef : uniqueColumns) {
if (udef.size() == 1) {
seenUniques.addAll(udef);
}
}
}
// primary key columns are also considered implicitly unique as of HSQL 2.2.4, and it will
// freak out if we also try to include them in the UNIQUE clause, so add those too
seenUniques.addAll(pkColumns);