File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
hibernate-core/src/matrix/java/org/hibernate/test/annotations/uniqueconstraint
hibernate-testing/src/main/java/org/hibernate/testing Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 5
5
import org .hibernate .JDBCException ;
6
6
import org .hibernate .Session ;
7
7
import org .hibernate .Transaction ;
8
+ import org .hibernate .testing .DialectChecks ;
9
+ import org .hibernate .testing .RequiresDialectFeature ;
8
10
import org .hibernate .testing .junit4 .BaseCoreFunctionalTestCase ;
9
11
10
12
import static org .junit .Assert .fail ;
@@ -23,6 +25,7 @@ protected Class[] getAnnotatedClasses() {
23
25
}
24
26
25
27
@ Test
28
+ @ RequiresDialectFeature ( DialectChecks .SupportNotNullUnique .class )
26
29
public void testUniquenessConstraintWithSuperclassProperty () throws Exception {
27
30
Session s = openSession ();
28
31
Transaction tx = s .beginTransaction ();
Original file line number Diff line number Diff line change @@ -92,6 +92,12 @@ public boolean isMatch(Dialect dialect) {
92
92
}
93
93
}
94
94
95
+ public static class SupportNotNullUnique implements DialectCheck {
96
+ public boolean isMatch (Dialect dialect ) {
97
+ return dialect .supportsNotNullUnique ();
98
+ }
99
+ }
100
+
95
101
public static class SupportLimitCheck implements DialectCheck {
96
102
public boolean isMatch (Dialect dialect ) {
97
103
return dialect .supportsLimit ();
You can’t perform that action at this time.
0 commit comments