From dd321af629a1765d603947b2322bfde454977105 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Wed, 13 Feb 2013 17:40:36 -0500 Subject: [PATCH] HHH-7999 Create HQLScrollFetchTest for dialects that do not support identity columns --- .../hqlfetchscroll/HQLScrollFetchTest.java | 3 +- .../NoIdentityHQLScrollFetchTest.java | 14 +++++++++ .../NoIdentityParentChild.hbm.xml | 31 +++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityHQLScrollFetchTest.java create mode 100644 hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityParentChild.hbm.xml diff --git a/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/HQLScrollFetchTest.java b/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/HQLScrollFetchTest.java index ab2a026a42..fac264f2fc 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/HQLScrollFetchTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/HQLScrollFetchTest.java @@ -27,7 +27,8 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.transform.DistinctRootEntityResultTransformer; import org.junit.Test; - +@SkipForDialect( value = { Oracle8iDialect.class }, + comment = "Oracle does not support the identity column used in the mapping. Extended by NoIdentityHQLScrollFetchTest" ) public class HQLScrollFetchTest extends BaseCoreFunctionalTestCase { private static final String QUERY = "select p from Parent p join fetch p.children c"; diff --git a/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityHQLScrollFetchTest.java b/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityHQLScrollFetchTest.java new file mode 100644 index 0000000000..2da0681334 --- /dev/null +++ b/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityHQLScrollFetchTest.java @@ -0,0 +1,14 @@ +package org.hibernate.test.hqlfetchscroll; + +import org.hibernate.dialect.Oracle8iDialect; +import org.hibernate.testing.RequiresDialect; + +@RequiresDialect( value = { Oracle8iDialect.class }, + comment = "Oracle does not support the identity column used in the HQLScrollFetchTest mapping." ) +public class NoIdentityHQLScrollFetchTest extends HQLScrollFetchTest { + + @Override + public String[] getMappings() { + return new String[] { "hqlfetchscroll/NoIdentityParentChild.hbm.xml" }; + } +} diff --git a/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityParentChild.hbm.xml b/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityParentChild.hbm.xml new file mode 100644 index 0000000000..dfed011ad6 --- /dev/null +++ b/hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/NoIdentityParentChild.hbm.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +