Skip to content

Commit

Permalink
Revert "HHH-9777 : Dereferenced collections are not processed properly"
Browse files Browse the repository at this point in the history
This reverts commit 9466446.
  • Loading branch information
gbadner committed Jun 17, 2015
1 parent f36e0ef commit 4d22b54
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 5 deletions.
Expand Up @@ -313,7 +313,7 @@ public boolean isDirty(Object old, Object current, SessionImplementor session)

// 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;

}
Expand Down
Expand Up @@ -31,7 +31,6 @@
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;
Expand All @@ -49,7 +48,6 @@
public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctionalTestCase {

@Test
@TestForIssue( jiraKey = "HHH-9777" )
public void testMergeNullCollection() {
Session s = openSession();
s.getTransaction().begin();
Expand Down Expand Up @@ -123,7 +121,6 @@ public void testMergeNullCollection() {
}

@Test
@TestForIssue( jiraKey = "HHH-9777" )
public void testGetAndNullifyCollection() {
Session s = openSession();
s.getTransaction().begin();
Expand Down Expand Up @@ -199,7 +196,7 @@ public void testGetAndNullifyCollection() {
}

@Test
@TestForIssue( jiraKey = "HHH-9777" )
//@FailureExpected( jiraKey = "HHH-9777")
public void testGetAndReplaceCollection() {
Session s = openSession();
s.getTransaction().begin();
Expand Down
Expand Up @@ -23,6 +23,10 @@
*/
package org.hibernate.test.collection.dereferenced;

import org.junit.Test;

import org.hibernate.testing.FailureExpected;

/**
* @author Gail Badner
*/
Expand All @@ -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();
}
}
Expand Up @@ -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();
}
}
Expand Up @@ -130,6 +130,7 @@ public String[] getMappings() {
}

@Test
@FailureExpected(jiraKey = "HHH-9777")
public void testSaveOrUpdateCopyAny() throws Exception {
Session s = openSession();
s.beginTransaction();
Expand Down

0 comments on commit 4d22b54

Please sign in to comment.