title: How to query mongodb with DBRef
body: <p>suppose I have the following datastructure:</p>
  
  <pre><code>var user = {_id: 'foo', age: 35};
  var post = {_id: '...', author: {$ref: user, $id: 'foo'},...};
  </code></pre>
  
  <p>How can I query all posts which references user[foo]? I tried the following but not work:</p>
  
  <pre><code>db.post.find('author._id': 'foo');
  var u = db.user.find({_id: 'foo'});
  db.post.find('author': u);
  </code></pre>
  
  <p>neither can I find the answer from the official document and google!</p>
  
  <p>Anyone has any idea?</p>