borinquenkid opened a new pull request, #16520:
URL: https://github.com/apache/grails-core/pull/16520
## Problem
`Club.where {}.max(10).offset(10).count()` returns `null` on Hibernate 7.
`HibernateQuery.countResults()` ran the count through the paging executor, so
`max`/`offset` applied to the single-row count result. Hibernate 5 ignores both
for `count()`.
## Fix
A count-specific executor (no offset, no max) used by both branches of
`countResults()`.
## Tests
Restored the two `offset(10)` assertions in `DetachedCriteriaJoinSpec`
("check if count works as expected"); they failed before the fix.
`detachedcriteria.*`, `query.*` and `*Count*`: 297 passed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]