Search in sources :

Example 1 with ContainsDocument

use of dev.morphia.test.models.errors.ContainsDocument in project morphia by mongodb.

the class TestMapping method testEmbeddedDocument.

@Test
public void testEmbeddedDocument() {
    getMapper().map(ContainsDocument.class);
    getDs().save(new ContainsDocument());
    assertNotNull(getDs().find(ContainsDocument.class).iterator(new FindOptions().limit(1)).next());
}
Also used : FindOptions(dev.morphia.query.FindOptions) ContainsDocument(dev.morphia.test.models.errors.ContainsDocument) Test(org.testng.annotations.Test)

Aggregations

FindOptions (dev.morphia.query.FindOptions)1 ContainsDocument (dev.morphia.test.models.errors.ContainsDocument)1 Test (org.testng.annotations.Test)1