{"action":"reopened","issue":{"url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/173","labels_url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/173/comments","events_url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/173/events","html_url":"https://github.com/aldeed/meteor-collection2/issues/173","id":56873438,"number":173,"title":"Question about createdAt","user":{"login":"boustanihani","id":4227548,"avatar_url":"https://avatars.githubusercontent.com/u/4227548?v=3","gravatar_id":"","url":"https://api.github.com/users/boustanihani","html_url":"https://github.com/boustanihani","followers_url":"https://api.github.com/users/boustanihani/followers","following_url":"https://api.github.com/users/boustanihani/following{/other_user}","gists_url":"https://api.github.com/users/boustanihani/gists{/gist_id}","starred_url":"https://api.github.com/users/boustanihani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boustanihani/subscriptions","organizations_url":"https://api.github.com/users/boustanihani/orgs","repos_url":"https://api.github.com/users/boustanihani/repos","events_url":"https://api.github.com/users/boustanihani/events{/privacy}","received_events_url":"https://api.github.com/users/boustanihani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-06T21:53:56Z","updated_at":"2015-02-09T18:15:41Z","closed_at":null,"body":"How about implementing ```createdAt``` with the following code:\r\n```javascript\r\ncreatedAt: {\r\n    type: Date,\r\n    denyUpdate: true,\r\n    autotValue: function() {\r\n        return new Date(); // forceValue\r\n    },\r\n},\r\n```\r\nInstead of using this code (https://github.com/aldeed/meteor-collection2#autovalue):\r\n```javascript\r\ncreatedAt: {\r\n    type: Date,\r\n    autoValue: function() {\r\n        if (this.isInsert) {\r\n            return new Date;\r\n        } else if (this.isUpsert) {\r\n            return {\r\n                $setOnInsert: new Date\r\n            };\r\n        } else {\r\n            this.unset();\r\n        }\r\n    },\r\n},\r\n```"}}