-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
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.