{"issue":{"state":"closed","pull_request":{"diff_url":"https://github.com/christkv/node-mongodb-native/pull/385.diff","html_url":"https://github.com/christkv/node-mongodb-native/pull/385","patch_url":"https://github.com/christkv/node-mongodb-native/pull/385.patch"},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/ae4267950800c87519632b9cc7a62097?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ae4267950800c87519632b9cc7a62097","url":"https://api.github.com/users/talentedmrjones","login":"talentedmrjones","id":119471},"labels":[],"updated_at":"2011-11-10T10:57:24Z","assignee":null,"closed_at":"2011-11-10T10:57:24Z","comments":1,"url":"https://api.github.com/repos/christkv/node-mongodb-native/issues/385","body":"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.\r\n\r\nSee: http://mongotips.com/b/a-few-objectid-tricks/","html_url":"https://github.com/christkv/node-mongodb-native/issues/385","title":"Date-based ObjectIDs","number":385,"id":2084691,"created_at":"2011-10-28T22:57:47Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/a132807512f576d8b2394a7a8b0379a0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a132807512f576d8b2394a7a8b0379a0","url":"https://api.github.com/users/christkv","login":"christkv","id":5569},"updated_at":"2011-11-10T10:57:24Z","url":"https://api.github.com/repos/christkv/node-mongodb-native/issues/comments/2693926","body":"not including this one as it's not needed :) just set _id on your doc to a Date object and you're set. _id can be any object in fact :)","id":2693926,"created_at":"2011-11-10T10:57:24Z"}}