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

Aggregation helper fails on simplified string form for $merge stage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1, 3.12.10
    • Component/s: Write Operations
    • Labels:
      None
    • Documentation Changes:
      Not Needed

      Description

      Originally reported in spring-data-mongodb#3743.

      In AggregateIterableImpl.getOutNamespace method
      BsonDocument mergeDocument = lastStageDocument.getDocument("$merge")
      this line does not consider simple String type when $merge use the simplified form, like {$merge: <collection>}

      The workaround is to use the long form of $merge, as documented here.

        Attachments

          Activity

            People

            Assignee:
            jeff.yemin Jeffrey Yemin
            Reporter:
            cstrobl Christoph Strobl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: