Please sign in to comment.
[Collection] Prepare reduce/finalize args for group queries
MongoCollection::group() will internally convert a string "reduce" argument to a MongoCode object, but it won't do it for the "finalize" option. Explicitly prepare both as we do in the map/reduce method. Also, avoid calling MongoCollection::group() with an empty array as the options parameter, since this will trigger an E_DEPRECATED notice in version 1.2.11+ of the driver. That notice may be removed in version 1.3, but we should leave this in place until the deprecation notices are removed entirely in 2.0.
- Loading branch information...
Showing with 39 additions and 4 deletions.