borinquenkid opened a new issue, #16812:
URL: https://github.com/apache/grails-core/issues/16812

   Split from audit #16804 (finding F14).
   
   ### Problem Description
   Comparing a property against a subquery (e.g. `gt "age", new 
DetachedCriteria(Person).build { projections { avg "age" } }`, as documented in 
the GORM reference manual) fails in Hibernate 7 because 
`handlePropertyCriterion()` binds the `DetachedCriteria` object as a query 
parameter rather than generating a subquery expression.
   
   ### Expected Behavior
   `PredicateGenerator` should check if `pc.getValue() instanceof 
QueryableCriteria` in comparison criterion handlers (`GreaterThan`, 
`GreaterThanEquals`, `LessThan`, `LessThanEquals`) and construct a JPA 
`Subquery<?>` expression compared via 
`criteriaBuilder.greaterThan(propertyPath, (Expression) subquery)`.


-- 
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]

  • [I] Hibernate 7: Support scala... borinquenkid (via GitHub) via notifications

Reply via email to