borinquenkid opened a new issue, #16809:
URL: https://github.com/apache/grails-core/issues/16809
Split from monolithic audit #16674 (finding F24).
### Problem Description
In non-SQL datastores (MongoDB and Neo4j), the documented aggregate subquery
forms from the GORM reference manual (e.g., `Person.where { age > avg(age) }`)
fail at runtime with:
```
MissingMethodException: No signature of method: ...avg() is applicable for
argument types: (grails.gorm.DetachedCriteria)
```
The where-query AST transformer emits a method call that MongoDB and Neo4j
criteria builders do not implement.
Both datastores have native mechanisms capable of expressing this logic:
- MongoDB can use `$expr` with an aggregation pipeline.
- Neo4j can use Cypher subqueries.
### Expected Behavior
Implement native aggregate subquery support for MongoDB and Neo4j, or
provide a clear `UnsupportedOperationException` explaining the datastore
limitation rather than an unexpected `MissingMethodException`.
--
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]