christkv/node-mongodb-native — pull request #385 by talentedmrjones (2011-10-28 22:57:47+00:00)
Title: Date-based ObjectIDs

Small change to constructor and generate() allows one to pass a Date instance into the ObjectID constructor. This is useful for doing date based queries on _id's leveraging an existing index rather than creating an additional index for a "created_at" field.

See: http://mongotips.com/b/a-few-objectid-tricks/