HHH-13312 Fix an invalid condition in new entity graph code

This commit is contained in:
Taras 2019-03-11 16:15:29 +02:00 committed by gbadner
parent 634782fef6
commit d18b46e1fe
1 changed files with 2 additions and 2 deletions

View File

@ -2849,7 +2849,7 @@ public final class SessionImpl
try { try {
if ( graphSemantic != null ) { if ( graphSemantic != null ) {
if ( rootGraph != null ) { if ( rootGraph == null ) {
throw new IllegalArgumentException( "Graph semantic specified, but no RootGraph was supplied" ); throw new IllegalArgumentException( "Graph semantic specified, but no RootGraph was supplied" );
} }
loadQueryInfluencers.getEffectiveEntityGraph().applyGraph( rootGraph, graphSemantic ); loadQueryInfluencers.getEffectiveEntityGraph().applyGraph( rootGraph, graphSemantic );
@ -3048,7 +3048,7 @@ public final class SessionImpl
try { try {
if ( graphSemantic != null ) { if ( graphSemantic != null ) {
if ( rootGraph != null ) { if ( rootGraph == null ) {
throw new IllegalArgumentException( "Graph semantic specified, but no RootGraph was supplied" ); throw new IllegalArgumentException( "Graph semantic specified, but no RootGraph was supplied" );
} }
loadQueryInfluencers.getEffectiveEntityGraph().applyGraph( rootGraph, graphSemantic ); loadQueryInfluencers.getEffectiveEntityGraph().applyGraph( rootGraph, graphSemantic );