Skip to content

Commit

Permalink
HHH-8275 union-subclass generates bad alter table for unique constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
brmeyer committed Jul 8, 2013
1 parent 804418b commit 80938a6
Showing 1 changed file with 6 additions and 8 deletions.
Expand Up @@ -87,14 +87,12 @@ public PrimaryKey getPrimaryKey() {

@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
Expand Down

0 comments on commit 80938a6

Please sign in to comment.