From dbfaa0d4f24a6dfb7d4c05df87de8075bd09333c Mon Sep 17 00:00:00 2001 From: Davide D'Alto Date: Tue, 11 Jun 2024 10:37:05 +0200 Subject: [PATCH] HHH-18254 Change `NativeQueryImpl#createCountQueryPlan` scope to protected So that I can re-use the code when implementing ReactiveSelectQueryPlan#getReactiveResultsCount in Hibernate Reactive --- .../org/hibernate/query/sql/internal/NativeQueryImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sql/internal/NativeQueryImpl.java b/hibernate-core/src/main/java/org/hibernate/query/sql/internal/NativeQueryImpl.java index a4ab8f635f..d96639eccc 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sql/internal/NativeQueryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sql/internal/NativeQueryImpl.java @@ -688,7 +688,10 @@ public class NativeQueryImpl .createQueryPlan( queryDefinition, getSessionFactory() ); } - private NativeSelectQueryPlan createCountQueryPlan() { + /* + * Used by Hibernate Reactive + */ + protected NativeSelectQueryPlan createCountQueryPlan() { final BasicType longType = getSessionFactory().getTypeConfiguration().getBasicTypeForJavaType(Long.class); final String sqlString = expandParameterLists(); final NativeSelectQueryDefinition queryDefinition = new NativeSelectQueryDefinition<>() {