Package org.mongodb.morphia.TestMapper

Examples of org.mongodb.morphia.TestMapper.CustomId


        assertNotNull(pwkLoaded);
    }

    @Test
    public void testComplexIdQuery() throws Exception {
        final CustomId cId = new CustomId();
        cId.setId(new ObjectId());
        cId.setType("banker");

        final UsesCustomIdObject object = new UsesCustomIdObject();
        object.setId(cId);
        object.setText("hllo");
        getDs().save(object);
View Full Code Here


        assertNotNull(getDs().find(UsesCustomIdObject.class, "_id.type", "banker").get());
    }

    @Test
    public void testComplexIdQueryWithRenamedField() throws Exception {
        final CustomId cId = new CustomId();
        cId.setId(new ObjectId());
        cId.setType("banker");

        final UsesCustomIdObject object = new UsesCustomIdObject();
        object.setId(cId);
        object.setText("hllo");
        getDs().save(object);
View Full Code Here

        assertNotNull(getDs().find(UsesCustomIdObject.class, "_id.t", "banker").get());
    }

    @Test
    public void testQBE() throws Exception {
        final CustomId cId = new CustomId();
        cId.setId(new ObjectId());
        cId.setType("banker");

        final UsesCustomIdObject object = new UsesCustomIdObject();
        object.setId(cId);
        object.setText("hllo");
        getDs().save(object);
View Full Code Here

TOP

Related Classes of org.mongodb.morphia.TestMapper.CustomId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.