mogo writeconcern

write concern sample:

 

http://www.cnblogs.com/xinghebuluo/archive/2011/12/01/2270896.html

 

WriteResult ret = db.update({"name":"lily"},{"$set":{"age":20}}, WriteConcern.SAFE);
if(ret.getLastError() == null)
    return true;
else
    return false;

你可能感兴趣的:(write)