-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.0.4
-
Component/s: Query Operations
-
None
com.mongodb.DBCollection#group(DBObject) is deprecated in 2.13 in favour of com.mongodb.GroupCommand and has been removed in 3.0
GroupCommand does not allow key functions to be specified and with the DBObject method removed there's no way to specify a key function to group any more.
GroupOperation does allow key functions, but because the GroupCommand#toOperation method is package protected it's not possible to create a subclass of GroupCommand that can accept key functions.
The net effect is that key functions in group operations are unavailable to JVM clients.