Move tests from org.hibernate.test.immutable to org.hibernate.orm.test.immutable

This commit is contained in:
Andrea Boriero 2021-04-06 18:19:43 +02:00
parent 951a7611b3
commit 6f42929b55
48 changed files with 1139 additions and 1026 deletions

View File

@ -4,7 +4,7 @@
* 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.immutable.entitywithmutablecollection;
package org.hibernate.orm.test.immutable.entitywithmutablecollection;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;

View File

@ -4,7 +4,7 @@
* 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.immutable.entitywithmutablecollection;
package org.hibernate.orm.test.immutable.entitywithmutablecollection;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

View File

@ -4,7 +4,7 @@
* 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.immutable.entitywithmutablecollection;
package org.hibernate.orm.test.immutable.entitywithmutablecollection;
import java.io.Serializable;
public class Info implements Serializable {

View File

@ -4,7 +4,7 @@
* 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.immutable.entitywithmutablecollection;
package org.hibernate.orm.test.immutable.entitywithmutablecollection;
import java.io.Serializable;
public class Owner implements Serializable {

View File

@ -4,7 +4,7 @@
* 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.immutable.entitywithmutablecollection;
package org.hibernate.orm.test.immutable.entitywithmutablecollection;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

View File

@ -4,7 +4,7 @@
* 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.immutable.entitywithmutablecollection;
package org.hibernate.orm.test.immutable.entitywithmutablecollection;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Iterator;

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariation.hbm.xml"
)
public class EntityWithInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
}

View File

@ -0,0 +1,27 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SkipForDialect;
/**
* @author Gail Badner
*/
@SkipForDialect(
dialectClass = CUBRIDDialect.class,
reason = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariationOneToManyJoin.hbm.xml"
)
public class EntityWithInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
}

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariation.hbm.xml"
)
public class EntityWithInverseOneToManyTest extends AbstractEntityWithOneToManyTest {
}

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariationVersioned.hbm.xml"
)
public class VersionedEntityWithInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
}

View File

@ -0,0 +1,78 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.FailureExpected;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.junit.jupiter.api.Test;
/**
* @author Gail Badner
* <p>
* These tests reproduce HHH-4992.
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariationVersioned.hbm.xml"
)
public class VersionedEntityWithInverseOneToManyFailureExpectedTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] {};
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with versioned entity with inverse collection"
)
public void testAddExistingOneToManyElementToPersistentEntity(SessionFactoryScope scope) {
super.testAddExistingOneToManyElementToPersistentEntity( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with versioned entity with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement(SessionFactoryScope scope) {
super.testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with versioned entity with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionMergeWithExistingElement(SessionFactoryScope scope) {
super.testCreateWithEmptyOneToManyCollectionMergeWithExistingElement( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with versioned entity with inverse collection"
)
public void testRemoveOneToManyElementUsingUpdate(SessionFactoryScope scope) {
super.testRemoveOneToManyElementUsingUpdate( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with versioned entity with inverse collection"
)
public void testRemoveOneToManyElementUsingMerge(SessionFactoryScope scope) {
super.testRemoveOneToManyElementUsingMerge( scope );
}
}

View File

@ -0,0 +1,80 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.FailureExpected;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.SkipForDialect;
import org.junit.jupiter.api.Test;
/**
* @author Gail Badner
*/
@SkipForDialect(
dialectClass = CUBRIDDialect.class,
reason = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariationVersionedOneToManyJoin.hbm.xml"
)
public class VersionedEntityWithInverseOneToManyJoinFailureExpectedTest extends AbstractEntityWithOneToManyTest {
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with inverse collection"
)
public void testAddExistingOneToManyElementToPersistentEntity(SessionFactoryScope scope) {
super.testAddExistingOneToManyElementToPersistentEntity( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement(SessionFactoryScope scope) {
super.testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionMergeWithExistingElement(SessionFactoryScope scope) {
super.testCreateWithEmptyOneToManyCollectionMergeWithExistingElement( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with inverse collection"
)
public void testRemoveOneToManyElementUsingUpdate(SessionFactoryScope scope) {
super.testRemoveOneToManyElementUsingUpdate( scope );
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
reason = "known to fail with inverse collection"
)
public void testRemoveOneToManyElementUsingMerge(SessionFactoryScope scope) {
super.testRemoveOneToManyElementUsingMerge( scope );
}
}

View File

@ -0,0 +1,40 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SkipForDialect;
/**
* @author Gail Badner
*/
@TestForIssue(jiraKey = "HHH-4992")
@SkipForDialect(
dialectClass = CUBRIDDialect.class,
reason = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariationVersionedOneToManyJoin.hbm.xml"
)
public class VersionedEntityWithInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
@Override
protected boolean checkUpdateCountsAfterAddingExistingElement() {
return false;
}
@Override
protected boolean checkUpdateCountsAfterRemovingElementWithoutDelete() {
return false;
}
}

View File

@ -4,22 +4,26 @@
* 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.immutable.entitywithmutablecollection.inverse;
package org.hibernate.orm.test.immutable.entitywithmutablecollection.inverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/inverse/ContractVariationVersioned.hbm.xml"
)
public class VersionedEntityWithInverseOneToManyTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationVersioned.hbm.xml" };
}
@Override
protected boolean checkUpdateCountsAfterAddingExistingElement() {
return false;
}
@Override
protected boolean checkUpdateCountsAfterRemovingElementWithoutDelete() {
return false;
}

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -15,7 +15,7 @@
-->
<hibernate-mapping package="org.hibernate.test.immutable.entitywithmutablecollection">
<hibernate-mapping package="org.hibernate.orm.test.immutable.entitywithmutablecollection">
<class name="Info" mutable="false">
<id name="id">
<generator class="increment"/>

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariation.hbm.xml"
)
public class EntityWithNonInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
}

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariationUnidir.hbm.xml"
)
public class EntityWithNonInverseManyToManyUnidirTest extends AbstractEntityWithManyToManyTest {
}

View File

@ -0,0 +1,27 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SkipForDialect;
/**
* @author Gail Badner
*/
@SkipForDialect(
dialectClass = CUBRIDDialect.class,
reason = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariationOneToManyJoin.hbm.xml"
)
public class EntityWithNonInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
}

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariation.hbm.xml"
)
public class EntityWithNonInverseOneToManyTest extends AbstractEntityWithOneToManyTest {
}

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariationUnidir.hbm.xml"
)
public class EntityWithNonInverseOneToManyUnidirTest extends AbstractEntityWithOneToManyTest {
}

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariationVersioned.hbm.xml"
)
public class VersionedEntityWithNonInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
}

View File

@ -0,0 +1,27 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SkipForDialect;
/**
* @author Gail Badner
*/
@SkipForDialect(
dialectClass = CUBRIDDialect.class,
reason = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariationVersionedOneToManyJoin.hbm.xml"
)
public class VersionedEntityWithNonInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
}

View File

@ -0,0 +1,20 @@
/*
* 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.orm.test.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.orm.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.orm.junit.DomainModel;
/**
* @author Gail Badner
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/immutable/entitywithmutablecollection/noninverse/ContractVariationVersioned.hbm.xml"
)
public class VersionedEntityWithNonInverseOneToManyTest extends AbstractEntityWithOneToManyTest {
}

View File

@ -1,19 +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.immutable.entitywithmutablecollection.inverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
/**
* @author Gail Badner
*/
public class EntityWithInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
@Override
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariation.hbm.xml" };
}
}

View File

@ -1,25 +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.immutable.entitywithmutablecollection.inverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.SkipForDialect;
/**
* @author Gail Badner
*/
@SkipForDialect(
value = CUBRIDDialect.class,
comment = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
public class EntityWithInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationOneToManyJoin.hbm.xml" };
}
}

View File

@ -1,18 +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.immutable.entitywithmutablecollection.inverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
/**
* @author Gail Badner
*/
public class EntityWithInverseOneToManyTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariation.hbm.xml" };
}
}

View File

@ -1,19 +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.immutable.entitywithmutablecollection.inverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
/**
* @author Gail Badner
*/
public class VersionedEntityWithInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
@Override
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationVersioned.hbm.xml" };
}
}

View File

@ -1,73 +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.immutable.entitywithmutablecollection.inverse;
import org.junit.Test;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.FailureExpected;
/**
* @author Gail Badner
*
* These tests reproduce HHH-4992.
*/
public class VersionedEntityWithInverseOneToManyFailureExpectedTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationVersioned.hbm.xml" };
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with versioned entity with inverse collection"
)
public void testAddExistingOneToManyElementToPersistentEntity() {
super.testAddExistingOneToManyElementToPersistentEntity();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with versioned entity with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement() {
super.testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with versioned entity with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionMergeWithExistingElement() {
super.testCreateWithEmptyOneToManyCollectionMergeWithExistingElement();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with versioned entity with inverse collection"
)
public void testRemoveOneToManyElementUsingUpdate() {
super.testRemoveOneToManyElementUsingUpdate();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with versioned entity with inverse collection"
)
public void testRemoveOneToManyElementUsingMerge() {
super.testRemoveOneToManyElementUsingMerge();
}
}

View File

@ -1,78 +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.immutable.entitywithmutablecollection.inverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.testing.SkipForDialect;
import org.junit.Test;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.FailureExpected;
/**
* @author Gail Badner
*/
@SkipForDialect(
value = CUBRIDDialect.class,
comment = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
public class VersionedEntityWithInverseOneToManyJoinFailureExpectedTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationVersionedOneToManyJoin.hbm.xml" };
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with inverse collection"
)
public void testAddExistingOneToManyElementToPersistentEntity() {
super.testAddExistingOneToManyElementToPersistentEntity();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement() {
super.testCreateWithEmptyOneToManyCollectionUpdateWithExistingElement();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with inverse collection"
)
public void testCreateWithEmptyOneToManyCollectionMergeWithExistingElement() {
super.testCreateWithEmptyOneToManyCollectionMergeWithExistingElement();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with inverse collection"
)
public void testRemoveOneToManyElementUsingUpdate() {
super.testRemoveOneToManyElementUsingUpdate();
}
@Test
@Override
@FailureExpected(
jiraKey = "HHH-4992",
message = "known to fail with inverse collection"
)
public void testRemoveOneToManyElementUsingMerge() {
super.testRemoveOneToManyElementUsingMerge();
}
}

View File

@ -1,36 +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.immutable.entitywithmutablecollection.inverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.TestForIssue;
/**
* @author Gail Badner
*/
@TestForIssue( jiraKey = "HHH-4992" )
@SkipForDialect(
value = CUBRIDDialect.class,
comment = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
public class VersionedEntityWithInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationVersionedOneToManyJoin.hbm.xml" };
}
protected boolean checkUpdateCountsAfterAddingExistingElement() {
return false;
}
protected boolean checkUpdateCountsAfterRemovingElementWithoutDelete() {
return false;
}
}

View File

@ -1,19 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
/**
* @author Gail Badner
*/
public class EntityWithNonInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
@Override
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariation.hbm.xml" };
}
}

View File

@ -1,19 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
/**
* @author Gail Badner
*/
public class EntityWithNonInverseManyToManyUnidirTest extends AbstractEntityWithManyToManyTest {
@Override
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationUnidir.hbm.xml" };
}
}

View File

@ -1,25 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.SkipForDialect;
/**
* @author Gail Badner
*/
@SkipForDialect(
value = CUBRIDDialect.class,
comment = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
public class EntityWithNonInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationOneToManyJoin.hbm.xml" };
}
}

View File

@ -1,18 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
/**
* @author Gail Badner
*/
public class EntityWithNonInverseOneToManyTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariation.hbm.xml" };
}
}

View File

@ -1,18 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
/**
* @author Gail Badner
*/
public class EntityWithNonInverseOneToManyUnidirTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationUnidir.hbm.xml" };
}
}

View File

@ -1,19 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithManyToManyTest;
/**
* @author Gail Badner
*/
public class VersionedEntityWithNonInverseManyToManyTest extends AbstractEntityWithManyToManyTest {
@Override
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationVersioned.hbm.xml" };
}
}

View File

@ -1,25 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.dialect.CUBRIDDialect;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
import org.hibernate.testing.SkipForDialect;
/**
* @author Gail Badner
*/
@SkipForDialect(
value = CUBRIDDialect.class,
comment = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with" +
"HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables"
)
public class VersionedEntityWithNonInverseOneToManyJoinTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationVersionedOneToManyJoin.hbm.xml" };
}
}

View File

@ -1,18 +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.immutable.entitywithmutablecollection.noninverse;
import org.hibernate.test.immutable.entitywithmutablecollection.AbstractEntityWithOneToManyTest;
/**
* @author Gail Badner
*/
public class VersionedEntityWithNonInverseOneToManyTest extends AbstractEntityWithOneToManyTest {
public String[] getMappings() {
return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationVersioned.hbm.xml" };
}
}