Skip to content

Commit 6a1adee

Browse files
committed
HHH-19394 fix a test which made a VERY strange assumption
This test seems to have been written to assume that Hibernate has to call getPersistProperty() during the flush cycle, but with it was actually wrong thet Hibernate was previously doing this.
1 parent 8b45e29 commit 6a1adee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/access/HierarchyPropertyAccessTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public void testParent(SessionFactoryScope scope) {
4444
assertThat( entity.getSuperProperty() ).isEqualTo( 8 );
4545

4646
entity.setProperty( "transient: updated" );
47+
// I had to add this call because this test was
48+
// assuming that Hibernate would call this getter
49+
// during flush, but that is no longer true
50+
entity.getPersistProperty();
4751
} );
4852

4953
scope.inTransaction( session -> {
@@ -66,6 +70,10 @@ public void testChild(SessionFactoryScope scope) {
6670
assertThat( entity.getSuperProperty() ).isEqualTo( 8 );
6771

6872
entity.setProperty( "transient: updated" );
73+
// I had to add this call because this test was
74+
// assuming that Hibernate would call this getter
75+
// during flush, but that is no longer true
76+
entity.getPersistProperty();
6977
} );
7078

7179
scope.inTransaction( session -> {

0 commit comments

Comments
 (0)