Examples of ensureIndexes()


Examples of com.google.code.morphia.AdvancedDatastore.ensureIndexes()

        }

        datastore = (AdvancedDatastore) morphia.createDatastore(mongo, dbName);

        datastore.ensureCaps();
        datastore.ensureIndexes();

        return datastore;
    }

    @Override
View Full Code Here

Examples of org.mongodb.morphia.Datastore.ensureIndexes()

                mongo,
                application.configuration().getString("mongodb.db"),
                application.configuration().getString("mongodb.username"),
                application.configuration().getString("mongodb.password").toCharArray());

        datastore.ensureIndexes();

        Logger.info("Connected to MongoDB [" + mongo.debugString() + "] database [" + datastore.getDB().getName() + "]");
        return datastore;
    }
View Full Code Here

Examples of org.mongodb.morphia.Datastore.ensureIndexes()

        // given
        getMorphia().map(IndexOnValue.class, NoIndexes.class);
        Datastore ds = getDs();

        // when
        ds.ensureIndexes();
        ds.save(new IndexOnValue());
        ds.save(new NoIndexes());

        // then
        List<DBObject> indexes = getDb().getCollection("NoIndexes").getIndexInfo();
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.