可以把所有要更新的字段先组装成一条记录, 在通过update去做一次更新。
例如 (把所有记录中的a修改成2,b修改成3):
BSONObject newRecord = new BasicBSONObject();
newRecord.put("a",2);
newRecord.put("b",3):
BSONObject updator = new BasicBSONObject();
updator.put("$set", newRecord);
cl.update(null, updator, null);