HHH-7999 Create HQLScrollFetchTest for dialects that do not support
identity columns
This commit is contained in:
parent
d6b3f373ea
commit
cc8395e280
|
@ -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";
|
||||
|
||||
|
|
|
@ -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" };
|
||||
}
|
||||
}
|
|
@ -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>
|
Loading…
Reference in New Issue