Skip to content

Commit 93f56ec

Browse files
gbadnerdreab8
authored andcommitted
HHH-9777 : Dereferenced collections are not processed properly
HHH-9777 : Dereferenced collections are not processed properly (test case changes only)
1 parent e07eef3 commit 93f56ec

File tree

5 files changed

+5
-49
lines changed

5 files changed

+5
-49
lines changed

hibernate-core/src/main/java/org/hibernate/type/CollectionType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public boolean isDirty(Object old, Object current, SessionImplementor session)
321321

322322
// TODO: I don't really like this implementation; it would be better if
323323
// this was handled by searchForDirtyCollections()
324-
return isOwnerVersioned( session ) && super.isDirty( old, current, session );
324+
return super.isDirty( old, current, session );
325325
// return false;
326326

327327
}

hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/AbstractDereferencedCollectionTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.hibernate.engine.spi.CollectionEntry;
3232
import org.hibernate.engine.spi.EntityEntry;
3333
import org.hibernate.engine.spi.SessionImplementor;
34+
import org.hibernate.testing.TestForIssue;
3435
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
3536

3637
import java.lang.InstantiationException;
@@ -48,6 +49,7 @@
4849
public abstract class AbstractDereferencedCollectionTest extends BaseCoreFunctionalTestCase {
4950

5051
@Test
52+
@TestForIssue( jiraKey = "HHH-9777" )
5153
public void testMergeNullCollection() {
5254
Session s = openSession();
5355
s.getTransaction().begin();
@@ -121,6 +123,7 @@ public void testMergeNullCollection() {
121123
}
122124

123125
@Test
126+
@TestForIssue( jiraKey = "HHH-9777" )
124127
public void testGetAndNullifyCollection() {
125128
Session s = openSession();
126129
s.getTransaction().begin();
@@ -196,7 +199,7 @@ public void testGetAndNullifyCollection() {
196199
}
197200

198201
@Test
199-
//@FailureExpected( jiraKey = "HHH-9777")
202+
@TestForIssue( jiraKey = "HHH-9777" )
200203
public void testGetAndReplaceCollection() {
201204
Session s = openSession();
202205
s.getTransaction().begin();

hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedCascadeDereferencedCollectionTest.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
*/
2424
package org.hibernate.test.collection.dereferenced;
2525

26-
import org.junit.Test;
27-
28-
import org.hibernate.testing.FailureExpected;
29-
3026
/**
3127
* @author Gail Badner
3228
*/
@@ -36,25 +32,4 @@ public class UnversionedCascadeDereferencedCollectionTest extends AbstractDerefe
3632
protected Class<?> getCollectionOwnerClass() {
3733
return UnversionedCascadeOne.class;
3834
}
39-
40-
@Override
41-
@Test
42-
@FailureExpected(jiraKey = "HHH-9777")
43-
public void testMergeNullCollection() {
44-
super.testMergeNullCollection();
45-
}
46-
47-
@Override
48-
@Test
49-
@FailureExpected(jiraKey = "HHH-9777")
50-
public void testGetAndNullifyCollection() {
51-
super.testGetAndNullifyCollection();
52-
}
53-
54-
@Override
55-
@Test
56-
@FailureExpected(jiraKey = "HHH-9777")
57-
public void testGetAndReplaceCollection() {
58-
super.testGetAndReplaceCollection();
59-
}
6035
}

hibernate-core/src/test/java/org/hibernate/test/collection/dereferenced/UnversionedNoCascadeDereferencedCollectionTest.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,4 @@ public class UnversionedNoCascadeDereferencedCollectionTest extends AbstractDere
3636
protected Class<?> getCollectionOwnerClass() {
3737
return UnversionedNoCascadeOne.class;
3838
}
39-
40-
@Override
41-
@Test
42-
@FailureExpected(jiraKey = "HHH-9777")
43-
public void testMergeNullCollection() {
44-
super.testMergeNullCollection();
45-
}
46-
47-
@Override
48-
@Test
49-
@FailureExpected(jiraKey = "HHH-9777")
50-
public void testGetAndNullifyCollection() {
51-
super.testGetAndNullifyCollection();
52-
}
53-
54-
@Override
55-
@Test
56-
@FailureExpected(jiraKey = "HHH-9777")
57-
public void testGetAndReplaceCollection() {
58-
super.testGetAndReplaceCollection();
59-
}
6039
}

hibernate-core/src/test/java/org/hibernate/test/legacy/FooBarTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public String[] getMappings() {
118118
}
119119

120120
@Test
121-
@FailureExpected(jiraKey = "HHH-9777")
122121
public void testSaveOrUpdateCopyAny() throws Exception {
123122
Session s = openSession();
124123
s.beginTransaction();

0 commit comments

Comments
 (0)