Skip to content

Commit 6a7ba40

Browse files
committed
Revert "HHH-7287 - Problem in caching proper natural-id-values when obtaining result by naturalIdQuery"
This reverts commit 7757b1d.
1 parent 1c98c9e commit 6a7ba40

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/mapping/naturalid/mutable/MutableNaturalIdTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,9 @@ public void testEviction(SessionFactoryScope scope) {
367367
@Test
368368
@JiraKey("HHH-7287")
369369
public void testModificationInOtherSession(SessionFactoryScope factoryScope) {
370-
var id = factoryScope.fromTransaction( (session) -> {
370+
factoryScope.inTransaction( (session) -> {
371371
User u = new User( "gavin", "hb", "secret" );
372372
session.persist( u );
373-
return u.getId();
374373
} );
375374

376375
// Use transactionless session
@@ -381,7 +380,7 @@ public void testModificationInOtherSession(SessionFactoryScope factoryScope) {
381380

382381
// CHANGE natural-id values in another session
383382
factoryScope.inTransaction( (otherSession) -> {
384-
var u = otherSession.find( User.class, id );
383+
var u = otherSession.find( User.class, 1 );
385384
u.setOrg( "zz" );
386385
} );
387386
// CHANGE APPLIED

0 commit comments

Comments
 (0)