title: mongoose CastError: Cast to ObjectId failed for value at path "_id"
body: <p>Here is my schema:</p>
  
  <pre><code>let mongoose = require('mongoose');
  let schema = new mongoose.Schema({
    type: String,
    value: String,
    attributes:[mongoose.Schema.Types.Mixed],
    created_at: Date,
    updated_at: Date
  })
  </code></pre>
  
  <p>then I create a new collection with {type:'user_id', value: 1},
  and then I get the new data with query:</p>
  
  <pre><code>{type: 'user_id', value: '1'}
  </code></pre>
  
  <p>it is fine, and here is the result:</p>
  
  <pre><code>"_id" : ObjectId("5874c5dbed927207df177d3b"),
  "type" : "phone",
  "value" : "13811785500",
  "updated_at" : ISODate("2017-01-10T11:30:19.266Z"),
  "created_at" : ISODate("2017-01-10T11:30:19.266Z"),
  "attributes" : [], 
  </code></pre>
  
  <p>and then,I query the save collection with collection`s ObjectId:</p>
  
  <pre><code>models.findBydId("5874c5dbed927207df177d3b")
  </code></pre>
  
  <p>it throw error:</p>
  
  <pre><code>CastError: Cast to ObjectId failed for value "5875976f8a03b2229c544c50"    at path "_id" for model "vertex"
  </code></pre>
  
  <p>can anybody tell me what`s wrong?
  thanks.</p>