Mitch Pirtle
2010-09-10 15:42:08 UTC
Hi fellow Mongonians,
I had a document with a value that looked like this:
"value" : 57.519999999999996
I did an increment of 30 like this:
db.thingies.update({"_id":"74795"}, {$inc : {"value" : 30}})
And then the resulting value was this:
"value" : 87.52
Although this was handy as I wanted to do that myself, I find it a tad
disconcerting to have the database do that for me. This was done in
the shell BTW.
Is that standard behavior for $inc, or do I need to file a tracker item?
-- Mitch
I had a document with a value that looked like this:
"value" : 57.519999999999996
I did an increment of 30 like this:
db.thingies.update({"_id":"74795"}, {$inc : {"value" : 30}})
And then the resulting value was this:
"value" : 87.52
Although this was handy as I wanted to do that myself, I find it a tad
disconcerting to have the database do that for me. This was done in
the shell BTW.
Is that standard behavior for $inc, or do I need to file a tracker item?
-- Mitch