title: How can I find results from an ObjectId field?
body: <p>If I have a schema like this:</p>
  
  <pre><code>var Word = new Schema({
      name: { type: String, required: true },
      language: { type: ObjectId, ref: "Language", required: true }
  });
  </code></pre>
  
  <p>and I try to query it like this</p>
  
  <pre><code>var language = "5078547df6b753bc06000003";
  word.find({ language: language }, function (err, words) {
    console.log(words);
  });
  </code></pre>
  
  <p>I get an empty result set (<code>[]</code>). I know there exists a word with this language, because if I remove the <code>{language: language}</code> I get this object:</p>
  
  <pre><code>[{
    "_id": "5079fd7b6df57b1b64cbf25d",
    "name": "dog",
    "language": "5078547df6b753bc06000003",
  }]
  </code></pre>
  
  <p>I've tried using</p>
  
  <pre><code>var language = mongoose.Types.ObjectId("5078547df6b753bc06000003");
  word.find({ language: language }, //etc.
  </code></pre>
  
  <p>but it still returns an empty result set.</p>
  
  <p>Why can't mongoose find the word with this language id?</p>