Skip to content

Commit 23c3d08

Browse files
committed
HHH-19874 NullPointerException in org.hibernate.sql.ast.tree.from.TableGroup.resolveTableReference
1 parent 949cb17 commit 23c3d08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/EntitySelectFetchInitializer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ protected void initialize(EntitySelectFetchInitializerData data) {
204204
}
205205
}
206206
else if ( holder.getEntityInitializer() != this ) {
207-
// the entity is already being loaded elsewhere
208-
data.setState( State.INITIALIZED );
207+
// the entity is already being loaded elsewhere in this processing level
208+
if ( holder.getJdbcValuesProcessingState() == rowProcessingState.getJdbcValuesSourceProcessingState() ) {
209+
data.setState( State.INITIALIZED );
210+
}
209211
return;
210212
}
211213
else if ( data.getInstance() == null ) {

0 commit comments

Comments
 (0)