title: which is best for performance while referring using _id? While retrieving using _id, i am getting error INVALID OBJECT ID
body: <p>How should i refer a collection in another collection , a unique username or default _id (object id) or a normal id that increments when a new record is inserted . I read that object ids increase performance in mongoose , but i am unable to retrieve records using _ids as its giving error INVALID OBJECT ID . i am not getting error when retrieving using other keys like username . But as _id increases performance i am trying to use that . </p>
  
  <pre><code>  Model.find({_id : "idstring"})
  </code></pre>
  
  <p>I tried these 2 ways while defining schema , </p>
  
  <p>1)  no definition for _id , as it will be created automatically</p>
  
  <p>2) i defined _id like  this : _id : { type : Schema.ObjectId }</p>
  
  <p>In both ways, i am getting error "invalid object id" when retrieving records</p>
  
  <p>thanks</p>