title: MongoError: Mod on _id not allowed
body: <p>There are a few questions out there on this but I can't seem to find a solution that seems to be the accepted approach at the moment.</p>
  
  <p>I'm trying to update a document in MongoDB and I'm using Mongoosejs to do it. However, I'm getting this error:</p>
  
  <pre><code>{ [MongoError: Mod on _id not allowed]
    name: 'MongoError',
    lastErrorObject:
     { err: 'Mod on _id not allowed',
       code: 10148,
       n: 0,
       connectionId: 35,
       ok: 1 },
    ok: 0,
    errmsg: 'Mod on _id not allowed' }
  </code></pre>
  
  <p>The code I'm using to make the update is:</p>
  
  <pre><code>app.put('/task/:short', auth, function (req, res) {
    Task.findOneAndUpdate({short:req.params.short}, req.body, function(err, task) {
      if(err) console.log(err);
      res.json(200, {content: task});
    })
  });
  </code></pre>
  
  <p>because I had a "field" called "short_id" I thought it might be an issue with having a "_id" part to the field name so I changed it to "short" but still no luck - I get the same error. I've later discovered that it thinks I'm trying to change the _id field but I don't why. </p>