Revert "HHH-9777 : Dereferenced collections are not processed properly"

This reverts commit 9466446d39.
This commit is contained in:
Gail Badner 2015-06-16 18:09:02 -07:00
parent f36e0ef49e
commit 4d22b54dd5
5 changed files with 49 additions and 5 deletions

View File

@ -313,7 +313,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 super.isDirty( old, current, session );
return isOwnerVersioned( session ) && super.isDirty( old, current, session );
// return false;
}

View File

@ -31,7 +31,6 @@ 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;
@ -49,7 +48,6 @@ 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();
@ -123,7 +121,6 @@ public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctio
}
@Test
@TestForIssue( jiraKey = "HHH-9777" )
public void testGetAndNullifyCollection() {
Session s = openSession();
s.getTransaction().begin();
@ -199,7 +196,7 @@ public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctio
}
@Test
@TestForIssue( jiraKey = "HHH-9777" )
//@FailureExpected( jiraKey = "HHH-9777")
public void testGetAndReplaceCollection() {
Session s = openSession();
s.getTransaction().begin();

View File

@ -23,6 +23,10 @@
*/
package org.hibernate.test.collection.dereferenced;
import org.junit.Test;
import org.hibernate.testing.FailureExpected;
/**
* @author Gail Badner
*/
@ -32,4 +36,25 @@ 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();
}
}

View File

@ -36,4 +36,25 @@ 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();
}
}

View File

@ -130,6 +130,7 @@ public class FooBarTest extends LegacyTestCase {
}
@Test
@FailureExpected(jiraKey = "HHH-9777")
public void testSaveOrUpdateCopyAny() throws Exception {
Session s = openSession();
s.beginTransaction();