title: MongoDB $addToSet creates value as object
body: <p>On an Update, I'm trying to create a new array element or add to an existing array, which is how I interpreted $addToSet to work:</p>
  
  <p><a href="http://www.mongodb.org/display/DOCS/Updating" rel="nofollow">http://www.mongodb.org/display/DOCS/Updating</a></p>
  
  <p>But what I get if "tag" doesn't exist is the value as an object, not an array:</p>
  
  <p>"tag": {
       "0": "FreeShipping" 
    },</p>
  
  <p>using</p>
  
  <p>db.collection.update({ size : 10.5 }, {$addToSet : {tag : "FreeShipping"}} );</p>