HHH-13980 NullPointerException on AbstractEntityGraphVisitationStrategy.startingCollectionIndex

This commit is contained in:
Réda Housni Alaoui 2020-04-24 16:46:20 +02:00 committed by Steve Ebersole
parent 6df82bb6a6
commit 5963dc7fe8
1 changed files with 6 additions and 4 deletions

View File

@ -180,10 +180,12 @@ public abstract class AbstractEntityGraphVisitationStrategy
AttributeNodeImplementor attributeNode = attributeStack.getCurrent();
GraphImplementor subGraphNode = null;
Map<Class, Subgraph> subGraphs = attributeNode.getKeySubgraphs();
Class javaType = indexDefinition.getType().getReturnedClass();
if ( !subGraphs.isEmpty() && subGraphs.containsKey( javaType ) ) {
subGraphNode = (GraphImplementor) subGraphs.get( javaType );
if ( attributeNode != null ) {
Map<Class, Subgraph> subGraphs = attributeNode.getKeySubgraphs();
Class javaType = indexDefinition.getType().getReturnedClass();
if (!subGraphs.isEmpty() && subGraphs.containsKey(javaType)) {
subGraphNode = (GraphImplementor) subGraphs.get(javaType);
}
}
graphStack.push( subGraphNode );