Permalink
Browse files

HHH-7577 Dialect's supportsNotNullUnique not working when false

  • Loading branch information...
1 parent cb1069a commit 588d4be45be2d8941b88b4912ab1f6a9c659960f brmeyer committed Sep 6, 2012
@@ -394,7 +394,7 @@ public Iterator sqlAlterStrings(Dialect dialect, Mapping p, TableMetadata tableI
boolean useUniqueConstraint = column.isUnique() &&
dialect.supportsUnique() &&
- ( !column.isNullable() || dialect.supportsNotNullUnique() );
+ ( column.isNullable() || dialect.supportsNotNullUnique() );
if ( useUniqueConstraint ) {
alter.append( " unique" );
}
@@ -495,7 +495,7 @@ public String sqlCreateString(Dialect dialect, Mapping p, String defaultCatalog,
}
boolean useUniqueConstraint = col.isUnique() &&
- ( !col.isNullable() || dialect.supportsNotNullUnique() );
+ ( col.isNullable() || dialect.supportsNotNullUnique() );
if ( useUniqueConstraint ) {
if ( dialect.supportsUnique() ) {
buf.append( " unique" );
@@ -200,7 +200,7 @@ public String getQualifiedName(Dialect dialect) {
}
boolean useUniqueConstraint = col.isUnique() &&
- ( !col.isNullable() || dialect.supportsNotNullUnique() );
+ ( col.isNullable() || dialect.supportsNotNullUnique() );
if ( useUniqueConstraint ) {
if ( dialect.supportsUnique() ) {
buf.append( " unique" );

0 comments on commit 588d4be

Please sign in to comment.