vznet/mongo-jackson-mapper — pull request #23 by spektom (2012-07-09 08:16:37+00:00)
Title: findAndModify syntactic sugar

Hi,

This method is really missing, instead of constructing BasicDBObject() like this:

Query query = DBQuery.is("authToken", authToken);
BasicDBObject update = new BasicDBObject("$set", new BasicDBObject("lastAccess", System.currentTimeMillis()));
session = coll.sessions().findAndModify(query, null, null, false, update, true, false);

one can use builder for creating an update query:

Query query = DBQuery.is("authToken", authToken);
Builder update = DBUpdate.set("lastAccess", System.currentTimeMillis());
session = coll.sessions().findAndModify(query, null, null, false, update, true, false);