Closed
Description
Christoph Strobl opened DATAMONGO-2153 and commented
public interface MyRepo extends MongoRepsitory<...> {
@Aggregate(pipeline = "{'$group': { _id: '$templateId', maxVersion : { $max : '$version'} } }" )
MyProjectedType findTemplateWithMaxVersion();
}
The above should be able to load the pipeline from a file, just like the @Query
annotation and support placeholders so that one might use input variables within the aggregation
Issue Links:
- DATAMONGO-2116 Ability to add a comment to an aggregation pipeline
("is duplicated by")
Referenced from: pull request #743