{"action":"created","issue":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/250","labels_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/250/comments","events_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/250/events","html_url":"https://github.com/jagi/meteor-astronomy/issues/250","id":125217568,"number":250,"title":"Validated update operation?","user":{"login":"ayalpani","id":603179,"avatar_url":"https://avatars.githubusercontent.com/u/603179?v=3","gravatar_id":"","url":"https://api.github.com/users/ayalpani","html_url":"https://github.com/ayalpani","followers_url":"https://api.github.com/users/ayalpani/followers","following_url":"https://api.github.com/users/ayalpani/following{/other_user}","gists_url":"https://api.github.com/users/ayalpani/gists{/gist_id}","starred_url":"https://api.github.com/users/ayalpani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayalpani/subscriptions","organizations_url":"https://api.github.com/users/ayalpani/orgs","repos_url":"https://api.github.com/users/ayalpani/repos","events_url":"https://api.github.com/users/ayalpani/events{/privacy}","received_events_url":"https://api.github.com/users/ayalpani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-06T16:58:31Z","updated_at":"2016-01-06T17:24:04Z","closed_at":null,"body":"Hi @jagi, \r\n\r\nwhen using `Class.update()` (see http://astronomy.jagi.io/direct-collection-access), how do I make sure all updated docs are validated correctly, as configured?\r\n\r\nExample query:\r\n\r\n```AstroItem.update({color: 'green'}, {$set: {color: 'blue'}}, {multi: true})```\r\n\r\nWhere `AstroItem` is an astronomy class, linked to an `Items` collection. The above query does not validate by default.\r\n\r\nMust I first `find().fetch()` all matching docs, then `set()`, then `validate()`, then `save()`?\r\n\r\nCheers!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/comments/169395515","html_url":"https://github.com/jagi/meteor-astronomy/issues/250#issuecomment-169395515","issue_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/250","id":169395515,"user":{"login":"jagi","id":1051229,"avatar_url":"https://avatars.githubusercontent.com/u/1051229?v=3","gravatar_id":"","url":"https://api.github.com/users/jagi","html_url":"https://github.com/jagi","followers_url":"https://api.github.com/users/jagi/followers","following_url":"https://api.github.com/users/jagi/following{/other_user}","gists_url":"https://api.github.com/users/jagi/gists{/gist_id}","starred_url":"https://api.github.com/users/jagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagi/subscriptions","organizations_url":"https://api.github.com/users/jagi/orgs","repos_url":"https://api.github.com/users/jagi/repos","events_url":"https://api.github.com/users/jagi/events{/privacy}","received_events_url":"https://api.github.com/users/jagi/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T17:24:03Z","updated_at":"2016-01-06T17:24:03Z","body":"Unfortunately \"direct collection access\" in 1.0 is limited and you have to perform set, validate and save for each individual document after fetching. In 2.0 it will be done automatically."}}