{"action":"created","issue":{"url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/174","labels_url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/174/comments","events_url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/174/events","html_url":"https://github.com/aldeed/meteor-collection2/issues/174","id":56877685,"number":174,"title":"Calling clean using a merged schema","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-06T22:34:31Z","updated_at":"2015-02-07T10:19:53Z","closed_at":"2015-02-07T10:19:53Z","body":"According to: https://github.com/aldeed/meteor-autoform#onsubmit\r\nIf you use ```autoValue``` or ```defaultValue``` options, be aware that insertDoc and updateDoc will not yet have auto or default values added to them. If you're passing them to insert or update on a Mongo.Collection with a schema, then there's nothing to worry about. But if you're doing something else with the object on the client, then you might want to call ```clean``` to add the auto and default values:\r\n```javascript\r\nAutoForm.hooks({\r\n  peopleForm: {\r\n    onSubmit: function (doc) {\r\n      PeopleSchema.clean(doc);\r\n      console.log(\"People doc with auto values\", doc);\r\n      this.done();\r\n      return false;\r\n    }\r\n  }\r\n});\r\n```\r\n\r\nI noticed that when I call ```clean()``` using a **merged schema** using ```myCollection.simpleSchema()``` then only **defaultValues are added** but **not autoValues**, could this be a bug?\r\n"},"comment":{"url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/comments/73358460","html_url":"https://github.com/aldeed/meteor-collection2/issues/174#issuecomment-73358460","issue_url":"https://api.github.com/repos/aldeed/meteor-collection2/issues/174","id":73358460,"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},"created_at":"2015-02-07T10:19:53Z","updated_at":"2015-02-07T10:19:53Z","body":"Sorry, I was doing a stupid mistake :)"}}