Skip to content

Instantly share code, notes, and snippets.

@odrotbohm
Created August 7, 2013 07:30
Show Gist options
  • Save odrotbohm/6171980 to your computer and use it in GitHub Desktop.
Save odrotbohm/6171980 to your computer and use it in GitHub Desktop.
@Test
public void foo() {
TypeBasedAggregationOperationContext context = new TypeBasedAggregationOperationContext(Foo.class,
new MongoMappingContext(), new QueryMapper(converter));
Aggregation aggregation = newAggregation(Foo.class, group("bar.name"));
aggregation.toDbObject("foo", context);
}
static class Foo {
Bar bar;
}
static class Bar {
String name;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment