Package org.mongodb.morphia.testdaos

Examples of org.mongodb.morphia.testdaos.HotelDAO.update()


        assertTrue(hotelDAO.exists("type", Hotel.Type.BUSINESS));
        assertNotNull(hotelDAO.findOne("type", Hotel.Type.LEISURE));

        // try updating
        final UpdateOperations<Hotel> mods = hotelDAO.createUpdateOperations().inc("stars", 1);
        hotelDAO.update(hotelDAO.createQuery().filter("stars", 4), mods);
        assertEquals(2, hotelDAO.count(hotelDAO.createQuery().filter("stars", 5)));

        hotelDAO.deleteById(borg.getId());
        assertEquals(1, hotelDAO.count());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.