Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1979

GroupCommand should support key functions

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.0, 2.14.0
    • Affects Version/s: 3.0.4
    • Component/s: Query Operations
    • Labels:
      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.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            gordonsyme Gordon Syme
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: