If you insert a document with _id as a date and then try to querying using {$type: 17} it will cause an error. Tested on 2.4.9 and 2.5.5-pre (git hash: f65a0b814b8c77e3fbe90bca0c061c9b77f6acdb)
> db.blah.insert({_id: ISODate("0000-01-01")}) > db.blah.find({_id: {$type: 17}}) error: { "$err" : "wrong type for field () 17 != 9", "code" : 13111 }
- duplicates
-
SERVER-3304 Change comparison order so all Dates sort before all Timestamps
- Closed