Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

HHH-6851 DB2 doesn't support NotNullUnique causes org.hibernate.test.…

…annotations.uniqueconstraint.UniqueConstraintTest.testUniquenessConstraintWithSuperclassProperty fail
  • Loading branch information...
commit d7f3042e5b9eabd8c2ed46407fbc6601254cde2d 1 parent b42d5f7
Strong Liu stliu authored
3  hibernate-core/src/matrix/java/org/hibernate/test/annotations/uniqueconstraint/UniqueConstraintTest.java
View
@@ -5,6 +5,8 @@
import org.hibernate.JDBCException;
import org.hibernate.Session;
import org.hibernate.Transaction;
+import org.hibernate.testing.DialectChecks;
+import org.hibernate.testing.RequiresDialectFeature;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.junit.Assert.fail;
@@ -23,6 +25,7 @@
}
@Test
+ @RequiresDialectFeature( DialectChecks.SupportNotNullUnique.class )
public void testUniquenessConstraintWithSuperclassProperty() throws Exception {
Session s = openSession();
Transaction tx = s.beginTransaction();
6 hibernate-testing/src/main/java/org/hibernate/testing/DialectChecks.java
View
@@ -92,6 +92,12 @@ public boolean isMatch(Dialect dialect) {
}
}
+ public static class SupportNotNullUnique implements DialectCheck {
+ public boolean isMatch(Dialect dialect) {
+ return dialect.supportsNotNullUnique();
+ }
+ }
+
public static class SupportLimitCheck implements DialectCheck {
public boolean isMatch(Dialect dialect) {
return dialect.supportsLimit();
Please sign in to comment.
Something went wrong with that request. Please try again.