diff --git a/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java b/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java index 7a9bcd25dc..a9ad4a1b7f 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java @@ -321,7 +321,7 @@ public abstract class CollectionType extends AbstractType implements Association // TODO: I don't really like this implementation; it would be better if // this was handled by searchForDirtyCollections() - return isOwnerVersioned( session ) && super.isDirty( old, current, session ); + return super.isDirty( old, current, session ); // return false; } diff --git a/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/AbstractDereferencedCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/AbstractDereferencedCollectionTest.java index 8689bd0a88..35125edca1 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/AbstractDereferencedCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/AbstractDereferencedCollectionTest.java @@ -31,6 +31,7 @@ import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.engine.spi.CollectionEntry; import org.hibernate.engine.spi.EntityEntry; import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import java.lang.InstantiationException; @@ -48,6 +49,7 @@ import static org.junit.Assert.assertTrue; public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctionalTestCase { @Test + @TestForIssue( jiraKey = "HHH-9777" ) public void testMergeNullCollection() { Session s = openSession(); s.getTransaction().begin(); @@ -121,6 +123,7 @@ public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctio } @Test + @TestForIssue( jiraKey = "HHH-9777" ) public void testGetAndNullifyCollection() { Session s = openSession(); s.getTransaction().begin(); @@ -196,7 +199,7 @@ public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctio } @Test - //@FailureExpected( jiraKey = "HHH-9777") + @TestForIssue( jiraKey = "HHH-9777" ) public void testGetAndReplaceCollection() { Session s = openSession(); s.getTransaction().begin(); diff --git a/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedCascadeDereferencedCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedCascadeDereferencedCollectionTest.java index 66191f4ff6..3b9392a564 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedCascadeDereferencedCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedCascadeDereferencedCollectionTest.java @@ -23,10 +23,6 @@ */ package org.hibernate.test.collection.dereferenced; -import org.junit.Test; - -import org.hibernate.testing.FailureExpected; - /** * @author Gail Badner */ @@ -36,25 +32,4 @@ public class UnversionedCascadeDereferencedCollectionTest extends AbstractDerefe protected Class getCollectionOwnerClass() { return UnversionedCascadeOne.class; } - - @Override - @Test - @FailureExpected(jiraKey = "HHH-9777") - public void testMergeNullCollection() { - super.testMergeNullCollection(); - } - - @Override - @Test - @FailureExpected(jiraKey = "HHH-9777") - public void testGetAndNullifyCollection() { - super.testGetAndNullifyCollection(); - } - - @Override - @Test - @FailureExpected(jiraKey = "HHH-9777") - public void testGetAndReplaceCollection() { - super.testGetAndReplaceCollection(); - } } \ No newline at end of file diff --git a/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedNoCascadeDereferencedCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedNoCascadeDereferencedCollectionTest.java index e6c01a491b..655e36d81e 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedNoCascadeDereferencedCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedNoCascadeDereferencedCollectionTest.java @@ -36,25 +36,4 @@ public class UnversionedNoCascadeDereferencedCollectionTest extends AbstractDere protected Class getCollectionOwnerClass() { return UnversionedNoCascadeOne.class; } - - @Override - @Test - @FailureExpected(jiraKey = "HHH-9777") - public void testMergeNullCollection() { - super.testMergeNullCollection(); - } - - @Override - @Test - @FailureExpected(jiraKey = "HHH-9777") - public void testGetAndNullifyCollection() { - super.testGetAndNullifyCollection(); - } - - @Override - @Test - @FailureExpected(jiraKey = "HHH-9777") - public void testGetAndReplaceCollection() { - super.testGetAndReplaceCollection(); - } } diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/FooBarTest.java b/hibernate-core/src/test/java/org/hibernate/test/legacy/FooBarTest.java index 23aa444b52..05d397779f 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/legacy/FooBarTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/FooBarTest.java @@ -118,7 +118,6 @@ public class FooBarTest extends LegacyTestCase { } @Test - @FailureExpected(jiraKey = "HHH-9777") public void testSaveOrUpdateCopyAny() throws Exception { Session s = openSession(); s.beginTransaction();