title: mongoose update fields and add new field
body: <p>I already googled a lot but unfortunately, I'm unable to solve my problem...
  I've some documents in my MongoDB and now I added a new optional field to my mongoose schema. Unfortunately, I cannot update my existing documents with this new field.</p>
  
  <pre><code>MyModel.findByIdAndUpdate(req.body.modelId, {$set: req.body}, {new: true})
  </code></pre>
  
  <p>This only updates the existing fields but unfortunately it doesn't add the new field.
  How can I force mongoose to add the new field to the document?</p>
  
  <hr>
  
  <p><strong>Update:</strong> My mistake. My schemas are having their own repository because I'm sharing them between different projects. I forgot to update them in the respective project. Now everything works perfect.</p>