> db.example.remove()
> db.example.save({ 'all' : {}, 'all-copy' : {}})
> db.example.update({}, { '$inc' : { 'all.t' : 1, 'all-copy.t' : 1 }})
> db.example.find()
{ "_id" : ObjectId("4dc8842c8c18470a86477303"), "all" : { }, "all-
copy" :
, "all" : { } }
As you can see, the document is now corrupt. Somehow there are two values with exactly the same key name, and the increment action did not complete. It has something to do with the hyphen and similar keynames, because removing the hyphen fixes the problem, and changing the keynames to something not so similar fixes the problem..