Save/Update like this?

This commit is contained in:
Olof Larsson 2013-05-01 18:26:50 +02:00
parent 5faf1a885e
commit eb3fc18f65

View File

@ -148,8 +148,9 @@ public class DriverMongo extends DriverAbstract
BasicDBObject dbo = MongoGsonConverter.gson2MongoObject(data); BasicDBObject dbo = MongoGsonConverter.gson2MongoObject(data);
Long mtime = System.currentTimeMillis(); Long mtime = System.currentTimeMillis();
dbo.put(MTIME_FIELD, mtime); 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; return mtime;
} }