HHH-8275 union-subclass generates bad alter table for unique constraint

This commit is contained in:
Brett Meyer 2013-06-03 17:19:38 -04:00
parent adcd61f0e1
commit 04f3249a12
1 changed files with 6 additions and 8 deletions

View File

@ -87,14 +87,12 @@ public class DenormalizedTable extends Table {
@Override
public Iterator getUniqueKeyIterator() {
//wierd implementation because of hacky behavior
//of Table.sqlCreateString() which modifies the
//list of unique keys by side-effect on some
//dialects
Map uks = new HashMap();
uks.putAll( getUniqueKeys() );
uks.putAll( includedTable.getUniqueKeys() );
return uks.values().iterator();
Iterator iter = includedTable.getUniqueKeyIterator();
while ( iter.hasNext() ) {
UniqueKey uk = (UniqueKey) iter.next();
createUniqueKey( uk.getColumns() );
}
return getUniqueKeys().values().iterator();
}
@Override