Hey,
After testing some more it actually seems like it's executing the $set and the last $inc but not the middle $inc. I guess BasicDBObject is backed by a hash so I'm overwriting the $inc key. Is there a way to batch multiple $incs?
Here's the (pseudo) code:
import com.mongodb._
import com.mongodb.{BasicDBObject => DBO}
val query = new DBO("_id", user.id.objectId)
val update = new DBO("$set", new DBO("status", user.status))
update.append("$inc", new DBO("stats.total", 1))
update.append("$inc", new DBO("stats.type", 1))
mongo.getCollection("users").update(query, update, true, false)
Also, any thoughts on why calling update.toString throws that exception I mentioned? That's almost bugging me more than the $inc because it's preventing me from logging my update.
Thanks,
Lincoln