Revert "HHH-9777 : Dereferenced collections are not processed properly"
This reverts commit 9466446d39
.
This commit is contained in:
parent
f36e0ef49e
commit
4d22b54dd5
|
@ -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
|
// TODO: I don't really like this implementation; it would be better if
|
||||||
// this was handled by searchForDirtyCollections()
|
// this was handled by searchForDirtyCollections()
|
||||||
return super.isDirty( old, current, session );
|
return isOwnerVersioned( session ) && super.isDirty( old, current, session );
|
||||||
// return false;
|
// return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.hibernate.collection.spi.PersistentCollection;
|
||||||
import org.hibernate.engine.spi.CollectionEntry;
|
import org.hibernate.engine.spi.CollectionEntry;
|
||||||
import org.hibernate.engine.spi.EntityEntry;
|
import org.hibernate.engine.spi.EntityEntry;
|
||||||
import org.hibernate.engine.spi.SessionImplementor;
|
import org.hibernate.engine.spi.SessionImplementor;
|
||||||
import org.hibernate.testing.TestForIssue;
|
|
||||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||||
|
|
||||||
import java.lang.InstantiationException;
|
import java.lang.InstantiationException;
|
||||||
|
@ -49,7 +48,6 @@ import static org.junit.Assert.assertTrue;
|
||||||
public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctionalTestCase {
|
public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctionalTestCase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestForIssue( jiraKey = "HHH-9777" )
|
|
||||||
public void testMergeNullCollection() {
|
public void testMergeNullCollection() {
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
s.getTransaction().begin();
|
s.getTransaction().begin();
|
||||||
|
@ -123,7 +121,6 @@ public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctio
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestForIssue( jiraKey = "HHH-9777" )
|
|
||||||
public void testGetAndNullifyCollection() {
|
public void testGetAndNullifyCollection() {
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
s.getTransaction().begin();
|
s.getTransaction().begin();
|
||||||
|
@ -199,7 +196,7 @@ public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctio
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestForIssue( jiraKey = "HHH-9777" )
|
//@FailureExpected( jiraKey = "HHH-9777")
|
||||||
public void testGetAndReplaceCollection() {
|
public void testGetAndReplaceCollection() {
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
s.getTransaction().begin();
|
s.getTransaction().begin();
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.test.collection.dereferenced;
|
package org.hibernate.test.collection.dereferenced;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import org.hibernate.testing.FailureExpected;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Gail Badner
|
* @author Gail Badner
|
||||||
*/
|
*/
|
||||||
|
@ -32,4 +36,25 @@ public class UnversionedCascadeDereferencedCollectionTest extends AbstractDerefe
|
||||||
protected Class<?> getCollectionOwnerClass() {
|
protected Class<?> getCollectionOwnerClass() {
|
||||||
return UnversionedCascadeOne.class;
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -36,4 +36,25 @@ public class UnversionedNoCascadeDereferencedCollectionTest extends AbstractDere
|
||||||
protected Class<?> getCollectionOwnerClass() {
|
protected Class<?> getCollectionOwnerClass() {
|
||||||
return UnversionedNoCascadeOne.class;
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,6 +130,7 @@ public class FooBarTest extends LegacyTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@FailureExpected(jiraKey = "HHH-9777")
|
||||||
public void testSaveOrUpdateCopyAny() throws Exception {
|
public void testSaveOrUpdateCopyAny() throws Exception {
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
s.beginTransaction();
|
s.beginTransaction();
|
||||||
|
|
Loading…
Reference in New Issue