Has anyone tried incorporating distinct in their query using Spring Data for Mongo. If you have an example can you please post it. Where and how sh
Lot has changed since this question was posted. Answering my own question as this question keeps popping up.
Support is there since 3.0 and higher
public DistinctIterable getUniqueTask() {
return mongoTemplate.getCollection(TABLE).distinct("FIELD", String.class);
}
Side Note: You can even add filters/regex to this query. Read docs. If you cannot find, ping, will post the answer.