-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Seems to be related to a parsing issue.
c = db.c;
c.drop();
c.save( {} );
// Seems to work, using syntax similar to that in testall.js.
printjson( c.aggregate( { $project : { date: { $isoDate:[{ year:1 }] } } } ) );
// Seems to not work because the year value is not 1 or 0.
printjson( c.aggregate( { $project : { date: { $isoDate:[{ year:2 }] } } } ) );
// Seems to not work using syntax from documentation page.
printjson( c.aggregate( { $project : { date: { $isoDate:{ '$year':2 } } } } ) );
printjson( c.aggregate( { $project : { date: { $isoDate:[{ '$year':2 }] } } } ) );
Observed behavior: assertions when trying to create a date with { $isoDate:[
{ year:1 }] }.
Expected behavior: a valid date is created.
- is duplicated by
-
SERVER-5762 conversions to dates don't accept constant arguments
-
- Closed
-