I have a simple (working) query from unwind to MongoDB, how can I write this query using Jongo? db.stores.aggregate([ { $unwind: "$listProducts" }, { $match : { "listProducts.productPrice" : { $ne : 0 } } }, { $group : { _id : { storeName : "$storeName", }, MAX_Products : { $max : "$listProducts.productPrice" } } } ]) What I have tried: Aggregate.ResultsIterator max = stores.aggregate("{$unwind:{$listProducts}") .and("{$match:{ $ne : 0 }") .and("{$group:{$storeName}") .and("{$max:{$listProducts.productPrice}") .as(Store.class); but I get Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse query: {$unwind:{$listProducts}
Thank you for any hint!
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)