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

mixing nested and dotted $project ExpressionObjects produces inconsistent results and assertions in some cases

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.0-rc1
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None

      Observed behavior: see test below
      Expected behavior: tbd (either honor all inclusion specifications or assert consistently)

      c = db.c;
      c.drop();
      
      c.save( { a:'foo', b:{ c:'bar' } } );
      
      // Only the b:a inclusion is applied.
      printjson( c.aggregate( { $project:{ b:{ a:1 }, 'b.c':1 } } ) );
      // Reversing the $project fields triggers an assertion.
      printjson( c.aggregate( { $project:{ 'b.c':1, b:{ a:1 } } } ) );
      

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: