Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3225

$addToSet accumulator not working fine.

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Problem Statement/Rationale

      When grouping, I want to add all the objects in the group to a set.

      Steps to Reproduce

      {
              $group:

      {             _id: '$request_id',             rows: \{$addToSet: '$'}

              }
          }

      Expected Results

      rows contains all the rows for the given request_id

      Actual Results

      rows only contains the first object it finds

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            Unassigned Unassigned
            Reporter:
            neagui@icloud.com Alin Neagu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: