fakemongo/fongo — pull request #48 by nilstgmd (2014-07-11 10:43:06+00:00)
Title: Correctly use setObjectClass(..) to define target objects

This pull request adds the possibility to define an object class which is returned from any query. Using object classes helps when using custom result objects instead of plain `DBObjects`. Instead of returning a `BasicDBObject`, a query will convert the `BasicDBObject` into the target object and return this directly.

Using this will avoid to define extra constructors in result classes and do the conversion of `BasicDBObject` in the production code on your own.

* Replace the result object with the target object
* unit test with custom object class (`TestResultObject`)

---

@hoffrocket please review, merge and delete the branch.