-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.1.1
-
Component/s: Aggregation Framework
-
ALL
Tried this
var x = db.runCommand({aggregate: "foo", pipeline: [ {$project: { // doesn't work // date: {$isoDate: {year: 2012, month: 2, dayOfMonth: 4} } , /* // this worked - copy-pasted from testall.js testDate: {$isoDate:{ year: "$year", month: "$month", dayOfMonth: "$dayOfMonth", hour: "$hour", minute: "$minutes", second: "$seconds"}} */ // this didn't testDate: {$isoDate:{ year: 2012, month: "$month", dayOfMonth: "$dayOfMonth", hour: "$hour", minute: "$minutes", second: "$seconds"}} }} ]});
Get this error
{ "errmsg" : "exception: \"year\" numeric inclusion or exclusion must be 1 or 0 (or boolean)", "code" : 15991, "ok" : 0 }
Looks like there's some kind of problem with the parser for this expression.
- duplicates
-
SERVER-6150 $isoDate cannot be created with field values other than 0 and 1
- Closed