From 353d24c7a224c3060b37220c9876311e09540f5a Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Tue, 28 Feb 2023 12:27:56 +0100 Subject: [PATCH] HHH-16230 Wrong data in self-reference using L2C and BatchSize --- .../internal/AbstractBatchEntitySelectFetchInitializer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/AbstractBatchEntitySelectFetchInitializer.java b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/AbstractBatchEntitySelectFetchInitializer.java index 0d976309f1..da763fa34a 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/AbstractBatchEntitySelectFetchInitializer.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/AbstractBatchEntitySelectFetchInitializer.java @@ -84,6 +84,7 @@ public abstract class AbstractBatchEntitySelectFetchInitializer extends Abstract @Override public void finishUpRow(RowProcessingState rowProcessingState) { entityInstance = null; + entityKey = null; clearResolutionListeners(); }