Closed jdpearce closed 1 year ago
Hello,
You can use the magic "from". It should work:
MongoOperator.max.from(
listOf(
MongoOperator.trunc.from(MongoOperator.divide(listOf(A::timeSaved.projection, 1000))),
A::seconds.projection
)
)
HTH
I'm having to use a query string in an aggregation because the
max
operator here only takes a single field and I need it to take two fields.I can replicate the $match clause in KMongo, but I cannot replicate the $group because max seems to only take a field and a constant? Is there a way to replicate this query with KMongo?