HHH-7999 Create HQLScrollFetchTest for dialects that do not support

identity columns
This commit is contained in:
Brett Meyer 2013-02-13 17:40:36 -05:00
parent d6b3f373ea
commit cc8395e280
3 changed files with 47 additions and 1 deletions

View File

@ -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";

View File

@ -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" };
}
}

View File

@ -0,0 +1,31 @@
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="org.hibernate.test.hqlfetchscroll">
<class name="Parent" table="Parents">
<id name="id">
<generator class="native"/>
</id>
<property name="name"/>
<set name="children" cascade="all-delete-orphan" lazy="false">
<key column="parent_id"/>
<one-to-many class="Child"/>
</set>
</class>
<class name="Child" table="chlidren">
<id name="id">
<generator class="native"/>
</id>
<property name="name"/>
</class>
</hibernate-mapping>