From 91b17b8179e7027bb57853d90b96f105f0a1e41b Mon Sep 17 00:00:00 2001 From: Marco Belladelli Date: Fri, 7 Jul 2023 12:36:13 +0200 Subject: [PATCH] HHH-16888 Return correlated root in findRoot() for entity joins --- .../query/sqm/tree/domain/SqmCorrelatedEntityJoin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java index 9f3ecaa820..033f37f183 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCorrelatedEntityJoin.java @@ -68,6 +68,11 @@ public class SqmCorrelatedEntityJoin extends SqmEntityJoin implements SqmC return path; } + @Override + public SqmRoot findRoot() { + return getCorrelatedRoot(); + } + @Override public X accept(SemanticQueryWalker walker) { return walker.visitCorrelatedEntityJoin(this);