title: Mongoose deleting (pull) a document within an array, does not work with ObjectID
body: <p>I have the following mongoose schema:</p>
  <pre><code>user = {
      &quot;userId&quot; : &quot;myId&quot;,
      &quot;connections&quot;:
      [{
          &quot;dateConnectedUnix&quot;: 1334567891,
          &quot;isActive&quot;: true
      }, {
          &quot;dateConnectedUnix&quot;: 1334567893,
          &quot;isActive&quot;: false
      }]
  }
  </code></pre>
  <p>I would like to delete the second item in the <code>connections</code> array, to get the following:</p>
  <pre><code>user = {
      &quot;userId&quot; : &quot;myId&quot;,
      &quot;connections&quot;: 
      [{
          &quot;dateConnectedUnix&quot;: 1334567893,
          &quot;isActive&quot;: false
      }]
  }
  </code></pre>
  <p>The following code does the job as expected:</p>
  <pre><code>userAccounts.update(
      { 'connections.isActive': false }, 
      { $pull: { 'connections.isActive':false }}, 
      function (err, val) {
          console.log(val)
      }
  );
  </code></pre>
  <p>But, I need to delete based on ObjectId.  And the following goes does not work:</p>
  <pre><code>userAccounts.update(
      { 'connections._id': '1234-someId-6789' }, 
      { $pull: { 'connections._id': '1234-someId-6789' } },
      function (err, val) {
          console.log(val)
      }
  );
  </code></pre>
  <p>Any suggestions? I have been banging my head against the screen (aka Google, Stackoverflow, ...) for hours and have had no luck.</p>