Save/Update like this?

This commit is contained in:
Olof Larsson committed 2013-05-01 18:26:50 +02:00
1 parent 5faf1a885e
commit eb3fc18f65
1 file changed
+2 -1
@@ -148,8 +148,9 @@ public class DriverMongo extends DriverAbstract
BasicDBObject dbo = MongoGsonConverter.gson2MongoObject(data);
Long mtime = System.currentTimeMillis();
dbo.put(MTIME_FIELD, mtime);
dbo.put(ID_FIELD, id);
dbcoll.update(new BasicDBObject(ID_FIELD, id), dbo, true, false);
dbcoll.save(dbo);
return mtime;
}