title: MongooseJS using find to find by reference
body: <p>I have this Mongoose Schema.</p>
  
  <pre><code>var mongoose = require ('mongoose')
    , dev      = require ('../db').dev ();
  
  var schema = new mongoose.Schema ({
    date: {
      type: Date,
      default: Date.now
    },
    company: {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'Company'
    },
    questionnaire: {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'Questionnaire'
    }
  });
  
  module.exports = dev.model ('Survey', schema);
  </code></pre>
  
  <p>I want to find only the surveys which have a specific company id. How do I do that? I tried (with my Express handler):</p>
  
  <pre><code>app.get ('/survey', function (req, res) {
    Survey.find ({ company: req.query.company }).populate ('questionnaire').exec (function (err, surveys) {
      return res.json (surveys);
    });
  });
  </code></pre>