title: Mongoose update query not working with node.js
body: <p>First I am making entries in mongodb by:</p>
  
  <pre><code>var device = new Device(inputDetailsJson); //device model instance
  
  device.save(function(err) { 
                              if (err) {
                                  res.send(err);
                              } else {
                                  res.write('Successful');
                                  res.end();
                              }
  
                          });
  </code></pre>
  
  <p>This is the device model:</p>
  
  <pre><code>// Dependencies
  var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  
  // Schema Definition
  var deviceSchema=new Schema ({
      "deviceId":{ type : String , unique: true},
      "version":{ type : String },
      "manufacturer":{ type : String },
      "modelname":{ type : String },
  
  
  });
  
  // Model
  module.exports = mongoose.model('de', deviceSchema);
  </code></pre>
  
  <p>This is the inputDetailsJson:</p>
  
  <pre><code>{   
              "deviceId":"3236172417",
              "version":"5.2.3",
              "manufacturer":"abc",
              "modelname":"example"
  }
  </code></pre>
  
  <p>These details are getting entered correctly, but when I try to update something, it reflects no changes.</p>
  
  <pre><code>var device=new Device();
  device.update({deviceId:"3236172417"},{modelname:"test"}
  ,function(err) {
  if (err) {
              return console.error(err);
          }
  else{
  res.write('successful');
  res.end();
  </code></pre>
  
  <p>It displays 'successful' even though no changes are made in the mongodb database. </p>