{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/067a588103adbbdccb2aa47a8e9a428b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"067a588103adbbdccb2aa47a8e9a428b","url":"https://api.github.com/users/omissis","login":"omissis","id":197604},"assignee":null,"updated_at":"2011-11-16T11:29:37Z","labels":[],"closed_at":null,"comments":1,"url":"https://api.github.com/repos/doctrine/mongodb/issues/25","body":"It seems that Query Builder does not have a finalize() method implemented and therefore I am not sure how to make use of this feature from Doctrine either in MapReduce or Group aggregation.\r\nThanks","html_url":"https://github.com/doctrine/mongodb/issues/25","title":"finalize() method is missing in QueryBuilder","number":25,"id":1774760,"created_at":"2011-09-29T13:13:41Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/548a2ee91870a67f1be55b7caa6a596e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"548a2ee91870a67f1be55b7caa6a596e","url":"https://api.github.com/users/lucasfilippi","login":"lucasfilippi","id":414703},"updated_at":"2011-11-16T11:29:37Z","url":"https://api.github.com/repos/doctrine/mongodb/issues/comments/2758439","body":"You can specify the finalize method in the getQuery options array : \r\n<pre><code>\r\n$query = $repository->createQueryBuilder('p')\r\n    ->map($mapFunction)\r\n    ->reduce($reduceFunction)\r\n    ->getQuery(array('finalize' => $finalizeFunction));\r\n</code></pre>","id":2758439,"created_at":"2011-11-16T11:29:37Z"}}