HHH-8037 - Empty SQL statements with custom UniqueDelegate

This commit is contained in:
Barney 2013-03-01 11:50:52 +01:00 committed by Brett Meyer
parent 5f8ba65ce1
commit 6b368e9512
1 changed files with 4 additions and 6 deletions

View File

@ -48,16 +48,14 @@ public class UniqueKey extends AbstractConstraint implements Constraint {
@Override
public String[] sqlCreateStrings(Dialect dialect) {
return new String[] {
dialect.getUniqueDelegate().applyUniquesOnAlter( this )
};
String s = dialect.getUniqueDelegate().applyUniquesOnAlter(this);
return (s == null || s.length() == 0) ? new String[0] : new String[]{s};
}
@Override
public String[] sqlDropStrings(Dialect dialect) {
return new String[] {
dialect.getUniqueDelegate().dropUniquesOnAlter( this )
};
String s = dialect.getUniqueDelegate().dropUniquesOnAlter(this);
return (s == null || s.length() == 0) ? new String[0] : new String[]{s};
}
@Override