2
How do I get mongoDB to return me a list of un-duplicated documents.
In my case mongoDB returns a list of ingredients from all registered recipes, but I want these records without duplication because the recipes can repeat the same ingredients. How can I solve this problem?
List<Datasheet> datasheets =
getDatastore().find(Datasheet.class).retrievedFields(true, "ingredients").asList();