File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/ondeletecascade Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 18
18
import org .hibernate .engine .spi .SessionImplementor ;
19
19
import org .hibernate .stat .EntityStatistics ;
20
20
import org .hibernate .stat .Statistics ;
21
+ import org .hibernate .testing .orm .junit .DialectFeatureChecks ;
21
22
import org .hibernate .testing .orm .junit .EntityManagerFactoryScope ;
22
23
import org .hibernate .testing .orm .junit .Jpa ;
24
+ import org .hibernate .testing .orm .junit .RequiresDialectFeature ;
23
25
import org .junit .jupiter .api .Test ;
24
26
25
27
import java .util .HashSet ;
34
36
OnDeleteCascadeRemoveTest .Child .class },
35
37
generateStatistics = true ,
36
38
useCollectingStatementInspector = true )
39
+ @ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsCascadeDeleteCheck .class )
37
40
class OnDeleteCascadeRemoveTest {
38
41
@ Test
39
42
void testOnDeleteCascadeRemove1 (EntityManagerFactoryScope scope ) {
Original file line number Diff line number Diff line change 9
9
import jakarta .persistence .ManyToOne ;
10
10
import jakarta .persistence .OneToMany ;
11
11
import org .hibernate .annotations .OnDelete ;
12
+ import org .hibernate .testing .orm .junit .DialectFeatureChecks ;
12
13
import org .hibernate .testing .orm .junit .EntityManagerFactoryScope ;
13
14
import org .hibernate .testing .orm .junit .Jpa ;
15
+ import org .hibernate .testing .orm .junit .RequiresDialectFeature ;
14
16
import org .junit .jupiter .api .AfterEach ;
15
17
import org .junit .jupiter .api .Test ;
16
18
22
24
import static org .junit .jupiter .api .Assertions .assertNull ;
23
25
24
26
@ Jpa (annotatedClasses = {OnDeleteTest .Parent .class , OnDeleteTest .Child .class })
27
+ @ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsCascadeDeleteCheck .class )
25
28
public class OnDeleteTest {
26
29
@ Test
27
30
public void testOnDelete (EntityManagerFactoryScope scope ) {
Original file line number Diff line number Diff line change 12
12
import org .hibernate .TransientObjectException ;
13
13
import org .hibernate .annotations .OnDelete ;
14
14
import org .hibernate .annotations .OnDeleteAction ;
15
+ import org .hibernate .testing .orm .junit .DialectFeatureChecks ;
15
16
import org .hibernate .testing .orm .junit .EntityManagerFactoryScope ;
16
17
import org .hibernate .testing .orm .junit .Jpa ;
18
+ import org .hibernate .testing .orm .junit .RequiresDialectFeature ;
17
19
import org .junit .jupiter .api .AfterEach ;
18
20
import org .junit .jupiter .api .Test ;
19
21
26
28
import static org .junit .jupiter .api .Assertions .fail ;
27
29
28
30
@ Jpa (annotatedClasses = {OnDeleteTest2 .Parent .class , OnDeleteTest2 .Child .class })
31
+ @ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsCascadeDeleteCheck .class )
29
32
public class OnDeleteTest2 {
30
33
@ Test
31
34
public void testOnDeleteParent (EntityManagerFactoryScope scope ) {
You can’t perform that action at this time.
0 commit comments