title: MongoDB insert from NODEJS converts data type of value from int to string
body: <p>I am trying to update an integer from NodeJS to a MongoDB collection, and however ways I have tried it always converts the integer into a string in the collection.</p>
  
  <p>Please note, I cannot have a strict mongoose schema.</p>
  
  <p>Here's my update function:</p>
  
  <pre><code> _getModel("envSettings").update(query, toUpdate , {upsert: insertIfNotFound}, function(err, docs){
     _prepResponse(err, docs, callback);
   });
  </code></pre>
  
  <p>The inputs to this piece of code is like this:</p>
  
  <pre><code>insertIfNotFound: false
  query: {'_id':'somekey'}
  </code></pre>
  
  <p>And here are the variety of toUpdate I have tried:</p>
  
  <pre><code>toUpdate: {$set:{value: 70}}
  toUpdate: {$set:{value: parseInt(70)}}
  toUpdate: {$set:{value: mongodb.Long(70).toInt()}}
  </code></pre>
  
  <p>When printing any of the above toUpdate to console, the output is always the same:</p>
  
  <pre><code>{'$set':{value:70}}
  </code></pre>
  
  <p>I am unsure of how can I save the type of field, please?</p>