HHH-9970 : Remove NoIdentityHQLScrollFetchTest and change HQLScrollFetchTest to work with "increment" ID generator

This commit is contained in:
Gail Badner 2015-07-22 18:47:52 -07:00
parent 8b7d58d1a3
commit 333e40465c
4 changed files with 2 additions and 71 deletions

View File

@ -10,14 +10,7 @@ import org.hibernate.Hibernate;
import org.hibernate.ScrollableResults;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.AbstractHANADialect;
import org.hibernate.dialect.DB2Dialect;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.dialect.TeradataDialect;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.hibernate.transform.DistinctRootEntityResultTransformer;
@ -36,8 +29,6 @@ import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@SkipForDialect( value = { Oracle8iDialect.class, AbstractHANADialect.class },
comment = "Oracle/HANA do 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";
@ -52,8 +43,6 @@ public class HQLScrollFetchTest extends BaseCoreFunctionalTestCase {
}
@Test
@SkipForDialect( { SQLServerDialect.class, Oracle8iDialect.class, DB2Dialect.class,
AbstractHANADialect.class, TeradataDialect.class } )
public void testScroll() {
Session s = openSession();
s.beginTransaction();

View File

@ -1,21 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.test.hqlfetchscroll;
import org.hibernate.dialect.AbstractHANADialect;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.testing.RequiresDialect;
@RequiresDialect( value = { Oracle8iDialect.class, AbstractHANADialect.class },
comment = "Oracle/HANA do 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

@ -1,37 +0,0 @@
<?xml version="1.0"?>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<!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>

View File

@ -15,7 +15,7 @@
<!-- A numeric id must be the <id> field. Some databases (Sybase, etc.)
require identifier columns in order to support scrollable results. -->
<id name="id">
<generator class="identity"/>
<generator class="increment"/>
</id>
<property name="name"/>
@ -31,7 +31,7 @@
<!-- A numeric id must be the <id> field. Some databases (Sybase, etc.)
require identifier columns in order to support scrollable results. -->
<id name="id">
<generator class="identity"/>
<generator class="increment"/>
</id>
<property name="name"/>