diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java index 61c4485946..aa7783e023 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java @@ -188,11 +188,12 @@ public class ConcreteSqmSelectQueryPlan implements SelectQueryPlan { synchronized ( this ) { localCopy = cacheableSqmInterpretation; if ( localCopy == null ) { - cacheableSqmInterpretation = localCopy = buildCacheableSqmInterpretation( + localCopy = buildCacheableSqmInterpretation( sqm, domainParameterXref, executionContext ); + cacheableSqmInterpretation = localCopy; } } }