doctrine/mongodb — pull request #64 by jmikola (2012-07-16 20:33:09+00:00)
Title: Revise query builder API for map/reduce and group

BC breaks:

* `reduce()`, `finalize()`, and 'out()` no longer reset the query type to map/reduce
* `reduce()` can no longer be used in place of `where()`. It seems like an improper use of `reduce()`, so I'd like to remove it. This use case isn't documented, and the relevant code was last touched in 445ec61dcf94a995a80ee542dba72b014a404529. I also found an ODM test case for this behavior (which I would remove if we merge this down).
* `reduce()` and `finalize()` will now raise an exception if the builder is not in the map/reduce or group query type state. Alternatively, we could store the argument into both the map/reduce and group arrays, but this seemed preferable.