Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-2874

$replaceRoot stages give an "Expected "[" or AggregationStage but "{" found." even on valid syntax

    XMLWordPrintable

    Details

    • # Replies:
      0
    • Last comment by Customer:
      true
    • Sprint:
      Sprint Vanilla Ice

      Description

      $replaceRoot Stage throws error event on correct syntax as below

      gaurav> db.produce.aggregate( [{$replaceRoot: { newRoot: "$in_stock" }} ] )
      

      But works well with this syntax:

      gaurav> db.produce.aggregate( [    {      $replaceRoot: { newRoot: {newRoot:"$in_stock"} }    } ] )
      

      See attachments for details.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 45 weeks, 5 days ago