HHH-7577 Dialect's supportsNotNullUnique not working when false

This commit is contained in:
brmeyer 2012-09-06 12:48:49 -04:00
parent b879c6ab7d
commit 3f34271a57
2 changed files with 3 additions and 3 deletions

View File

@ -394,7 +394,7 @@ public class Table implements RelationalModel, Serializable {
boolean useUniqueConstraint = column.isUnique() &&
dialect.supportsUnique() &&
( !column.isNullable() || dialect.supportsNotNullUnique() );
( column.isNullable() || dialect.supportsNotNullUnique() );
if ( useUniqueConstraint ) {
alter.append( " unique" );
}
@ -495,7 +495,7 @@ public class Table implements RelationalModel, Serializable {
}
boolean useUniqueConstraint = col.isUnique() &&
( !col.isNullable() || dialect.supportsNotNullUnique() );
( col.isNullable() || dialect.supportsNotNullUnique() );
if ( useUniqueConstraint ) {
if ( dialect.supportsUnique() ) {
buf.append( " unique" );

View File

@ -200,7 +200,7 @@ public class Table extends AbstractTableSpecification implements Exportable {
}
boolean useUniqueConstraint = col.isUnique() &&
( !col.isNullable() || dialect.supportsNotNullUnique() );
( col.isNullable() || dialect.supportsNotNullUnique() );
if ( useUniqueConstraint ) {
if ( dialect.supportsUnique() ) {
buf.append( " unique" );