This more flexible.

This commit is contained in:
Olof Larsson 2013-05-26 17:45:23 +02:00
parent 9b0e112a5c
commit 2c8c0b7c7d

View File

@ -136,8 +136,8 @@ public class DriverMongo extends DriverAbstract
BasicDBObject raw = (BasicDBObject)dbcoll.findOne(new BasicDBObject(ID_FIELD, id));
if (raw == null) return null;
Long mtime = ((Number)raw.removeField(MTIME_FIELD)).longValue();
raw.removeField(ID_FIELD);
Long mtime = (Long) raw.removeField(MTIME_FIELD);
JsonElement element = MongoGsonConverter.mongo2GsonObject(raw);