Examples of fillIdIfNoexits()


Examples of org.nutz.mongo.entity.MongoEntity.fillIdIfNoexits()

   */
  public <T extends Object> T save(T obj) {
    MongoEntity moe = Mongos.entity(obj);
    String collName = moe.getCollectionName(obj);
    if (db.collectionExists(collName)) {
      moe.fillIdIfNoexits(obj);
      DBObject dbo = moe.toDBObject(obj);
      DBCollection coll = db.getCollection(collName);
      coll.save(dbo);
      return obj;
    }
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.