HHH-6851 DB2 doesn't support NotNullUnique causes org.hibernate.test.annotations.uniqueconstraint.UniqueConstraintTest.testUniquenessConstraintWithSuperclassProperty fail
This commit is contained in:
parent
b42d5f7691
commit
d7f3042e5b
|
@ -5,6 +5,8 @@ import org.junit.Test;
|
|||
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 @@ public class UniqueConstraintTest extends BaseCoreFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@RequiresDialectFeature( DialectChecks.SupportNotNullUnique.class )
|
||||
public void testUniquenessConstraintWithSuperclassProperty() throws Exception {
|
||||
Session s = openSession();
|
||||
Transaction tx = s.beginTransaction();
|
||||
|
|
|
@ -92,6 +92,12 @@ abstract public class DialectChecks {
|
|||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue