miguelabautista opened a new issue, #14380:
URL: https://github.com/apache/grails-core/issues/14380
Environment:
Grails 5
GORM 7.1.0
Java 8
Problem:
I'm trying to run this simple code:
```
collection.aggregate(
Arrays.asList(
Aggregates.match(Filters.eq("categories", "Bakery")),
Aggregates.group('$stars', Accumulators.sum("count", 1))
)
).forEach(doc -> System.out.println(doc.toJson()));
```
the system throws this exception:
```
Cannot cast object 'Stage{name='$match',
value=Filter{fieldName='categories', value=Bakery}}' with class
'com.mongodb.client.model.Aggregates$SimplePipelineStage' to class
'java.util.Map'.
```
NOTE: Just tested in an empty gradle project with the same
mongodb-driver-sync version and it works. and in previous grails version
(4.0.12) this code works
why Is grails forcing me to use Map syntax?
--
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]