use of dev.morphia.test.models.generics.Another in project morphia by mongodb.
the class TestGenerics method example.
@Test
public void example() {
ChildEntity entity = new ChildEntity();
entity.setEmbeddedList(asList(new Child("first"), new Child("second"), new Another("third")));
getDs().save(entity);
ChildEntity childEntity = getDs().find(ChildEntity.class).iterator(new FindOptions().limit(1)).next();
Assert.assertEquals(childEntity, entity);
}
Aggregations