title: Mongoose findOneAndUpdate not working
body: <p>I am trying to use 'findOneAndUpdate' in mongoose and the updated JS object I am sending is not getting saved to mongo.  I do not get an error upon saving, but I do get back a null for the updated object.  Any ideas what I might be doing wrong?  This is example is trying to update the entire object as stored in mongo, i.e. overwrite the name object.</p>
  
  <pre><code>var query = {"_id": id};
  var update = {name: {first: 'john', last: 'smith'}};
  var options = {new: true};
  People.findOneAndUpdate(query, update, options, function(err, person) {
    if (err) {
      console.log('got an error');
    }
  
    // at this point person is null.
  });
  </code></pre>