Converting string to ObjectId is failing in mongoose 4.6.0
<p>I am trying to convert a string to ObjectId using</p>

<pre><code>var body={};
var objId="57b40595866fdab90268321e";
body.id=mongoose.Types.ObjectId(objId);

myModel.collection.insert(body,function(err,data){
//causing err;
});
</code></pre>

<p>the above code is working fine when mongoose 4.4.16 is used, but if i update my mongoose to latest version(4.6.0) then problem occurs.</p>

<p><strong>Err</strong></p>

<pre><code>  object [
  {
    "_bsontype":"ObjectID",
    "id:{"0":87,"1":180,"2":5,"3":235,"4":134,"5":111,"6":218,"7":185,"8":2,"9":104,"10":50,"11":111}
 }
] 
is not a valid ObjectId
</code></pre>