title: updating multiple documents by passing a list objectids to findByIdAndUpdate
body: <p>I am trying to use mongoose's findByIdAndUpdate method to pass in a list of object id's and updating them at once. However, I am getting a "Error: Can't use $set with ObjectId." error which I can't seem to associate with my code.</p>
  
  <p>Here's my code.</p>
  
  <pre><code>return ComponentModel.findByIdAndUpdate({
      _id: {
          $in: input.subjectIds
      },
      $set: { location: input.newLocation }
  }).then(res =&gt; res);
  </code></pre>