doctrine/mongodb-odm — pull request #318 by tystr (2012-06-05 21:25:15+00:00)
Title: Automatically handle querying by referenced document's id, if it is a DBRef

Currently, to find a document by a referenced document's id, you have to do this:

```PHP

$postRepository->findBy(array('categroy.$id' => new \MongoId($id)));
```

This PR allows querying for a document by a referenced document's DBRef id, so code like the following can be written and will work with both the ORM and the Mongodb ODM:

```PHP

$postRepository->findBy(array('categroy' => $id));
```