You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by GitBox <gi...@apache.org> on 2026/10/22 21:46:27 UTC
[GH] (grails-core/feat/criteria-handler-context-8.1.x): Workflow run "CI" is working again!
The GitHub Actions job "CI" on grails-core.git/feat/criteria-handler-context-8.1.x has succeeded.
Run started by GitHub user borinquenkid (triggered by borinquenkid).
Head commit for run:
66f1f26e20776b349f0addfe41b5a08c618ba39c / Walter Duque de Estrada <wb...@mac.com>
Hibernate 7: give criterion handlers the query context and let a handler order by an expression
Resolves #16563 on 8.x. A plugin or an application can extend the
Hibernate 7 criteria builder with its own criteria and orders.
- A criterion handler can take the query's QueryPathContext, a small
interface that JpaQueryContext implements (getRoot, getFullyQualifiedPath,
getFullyQualifiedExpression). Through it a handler resolves
alias.property or association.property to the join GORM created for the
association, so a custom criterion and a built-in one on the same
association restrict the same row instead of each joining it again. The
four-argument handler keeps working; ContextualCriterionHandler is the
five-argument form, and a closure with five parameters is coerced to it.
- An OrderHandler turns a Query.Order subclass into a JPA order by any
expression, in its place among the query's orders, registered in code or
through a META-INF/services OrderHandlerProvider.
- Handler discovery waits for the providers: loadServiceProviders loads
under a lock and publishes its flag only after both ServiceLoader loops,
so a query that arrives during the discovery no longer decides, with the
handlers still unregistered, that an order has no handler. A handler
registered in code stays ahead of a discovered one.
- A count query leaves its orders out, handled ones too (the fix of the
previous commit), so no handler runs for a count.
Covered by HibernateCriteriaBuilderDirectSpec (a contextual handler on an
association path before and after the association block, an order handler
through the builder and DetachedCriteria.list(), a count with a handled
order), OrderHandlerDiscoverySpec (a lookup during a blocked discovery
waits for the handler), PredicateGeneratorSpec and
JpaCriteriaQueryCreatorSpec. Documented in the Hibernate 7 guide and the
what's new; the criteria-extension example exercises both handler kinds
through providers.
This is the 8.1.x version of #16696, which becomes its merge-up onto the
Java-to-Groovy Hibernate 7 branch.
Report URL: https://github.com/apache/grails-core/actions/runs/39824781618
With regards,
GitHub Actions via GitBox