Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29512

Convert an ObjectId to a hex string in aggregation pipeline stages

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Query

      At the moment if you need to concatenate two ObjectIds into a single string value then this has to be done outside AP (in Java code, etc).

      What would be really handy is if there was so sort of $toString function that converts anything to a String representation or if you wanted to cut down the scope for now then expand the $concat function to internally convert ObjectIds to their hex string representation during the concat operation.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            aharris Andrew Harris
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: