Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
c = db.c;
|
c.drop();
|
|
|
c.save( { a:{ b:1 } } );
|
|
|
printjson( c.aggregate( { $project:{ ab:'$a.b' } } ) );
|
|
|
c.save( { a:1 } );
|
|
|
// Now asserts because a 'b' field cannot be found within 'a' in the new a:1 document.
|
printjson( c.aggregate( { $project:{ ab:'$a.b' } } ) );
|
Observed behavior: $project asserts if a field path references a non object parent.
Expected behavior: $project treats the field path as missing.