This is an automated email from the ASF dual-hosted git repository.

jamesfredley pushed a commit to branch test/h7-functional-coverage
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 2e0265328b3b44d6c6cb3d0c8d30864a130189fb
Author: James Fredley <[email protected]>
AuthorDate: Thu Jun 11 14:36:22 2026 -0400

    Normalize H7 GORM bug report typography
    
    Assisted-by: Hephaestus:openai/gpt-5.5
---
 H7_GORM_BUG_REPORT.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/H7_GORM_BUG_REPORT.md b/H7_GORM_BUG_REPORT.md
index 5911069c7f..0434a88734 100644
--- a/H7_GORM_BUG_REPORT.md
+++ b/H7_GORM_BUG_REPORT.md
@@ -32,7 +32,7 @@ Before those fixes, running `grails-test-examples-gorm` with 
`-PhibernateVersion
 
 **Description:** H7 intentionally rejects `executeQuery("from Book where 
inStock = true")` when no parameters are passed. The same tightening was 
already applied to `executeUpdate`. Callers must use `executeQuery('...', [:])` 
or a GString with interpolated params.
 
-> This is by design. The test bodies need to adopt the parameterized form — 
not a GORM bug.
+> This is by design. The test bodies need to adopt the parameterized form - 
not a GORM bug.
 
 ---
 
@@ -72,7 +72,7 @@ Before those fixes, running `grails-test-examples-gorm` with 
`-PhibernateVersion
 | **Spec** | `GormDataServicesSpec` |
 | **Errors** | `Incorrect query result type: query produces 'java.lang.Double' 
but type 'java.lang.Long' was given` / `query produces 'java.lang.Integer' but 
type 'java.lang.Long' was given` |
 
-**Description:** `HibernateHqlQuery.buildQuery()` always calls 
`session.createQuery(hql, ctx.targetClass())`. For aggregate HQL (`select 
avg(b.price) ...`, `select max(b.pageCount) ...`), the query does not return an 
entity, but `ctx.targetClass()` returns the entity class (e.g., `Book`). H7's 
`SqmQueryImpl` enforces strict result-type alignment — `avg()` produces 
`Double`, `max(pageCount)` produces `Integer`, neither is coercible to the 
bound entity type.
+**Description:** `HibernateHqlQuery.buildQuery()` always calls 
`session.createQuery(hql, ctx.targetClass())`. For aggregate HQL (`select 
avg(b.price) ...`, `select max(b.pageCount) ...`), the query does not return an 
entity, but `ctx.targetClass()` returns the entity class (e.g., `Book`). H7's 
`SqmQueryImpl` enforces strict result-type alignment: `avg()` produces 
`Double`, `max(pageCount)` produces `Integer`, neither is coercible to the 
bound entity type.
 
 **Expected fix:** `HibernateHqlQuery.buildQuery()` must detect non-entity HQL 
(aggregates / projections) and call the untyped `session.createQuery(hql)` in 
those cases, letting GORM handle result casting downstream.
 

Reply via email to