{"action":"created","issue":{"url":"https://api.github.com/repos/englue/meteor-publish-composite/issues/60","labels_url":"https://api.github.com/repos/englue/meteor-publish-composite/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/englue/meteor-publish-composite/issues/60/comments","events_url":"https://api.github.com/repos/englue/meteor-publish-composite/issues/60/events","html_url":"https://github.com/englue/meteor-publish-composite/issues/60","id":106475865,"number":60,"title":"Hard to trace bug","user":{"login":"dburles","id":319567,"avatar_url":"https://avatars.githubusercontent.com/u/319567?v=3","gravatar_id":"","url":"https://api.github.com/users/dburles","html_url":"https://github.com/dburles","followers_url":"https://api.github.com/users/dburles/followers","following_url":"https://api.github.com/users/dburles/following{/other_user}","gists_url":"https://api.github.com/users/dburles/gists{/gist_id}","starred_url":"https://api.github.com/users/dburles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dburles/subscriptions","organizations_url":"https://api.github.com/users/dburles/orgs","repos_url":"https://api.github.com/users/dburles/repos","events_url":"https://api.github.com/users/dburles/events{/privacy}","received_events_url":"https://api.github.com/users/dburles/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/englue/meteor-publish-composite/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-15T04:28:51Z","updated_at":"2015-10-02T19:21:30Z","closed_at":"2015-10-01T16:20:28Z","body":"Just thought I'd post this one as it was a weird one to trace. I was bitten by a transform on a collection that placed a couple of default fields.\r\n\r\nThe problem was brought about by having two publications that would publish the same document. The first publication returned the document with the `fields` option. The second publication had no restriction.\r\n\r\nThe first publication would send across the document with the limited fields *plus* the default fields added by the transform. Where this really bit was when subscribing to pub 2 we would receive a `changed` message for the existing document but it wouldn't include the fields that were added through the transform function! The solution was to remove the transform from within the publication.\r\n\r\nCursors returned by publications by default don't apply the transformation function, is there a specific reason why publish-composite does?\r\n"},"comment":{"url":"https://api.github.com/repos/englue/meteor-publish-composite/issues/comments/145130695","html_url":"https://github.com/englue/meteor-publish-composite/issues/60#issuecomment-145130695","issue_url":"https://api.github.com/repos/englue/meteor-publish-composite/issues/60","id":145130695,"user":{"login":"reywood","id":1796302,"avatar_url":"https://avatars.githubusercontent.com/u/1796302?v=3","gravatar_id":"","url":"https://api.github.com/users/reywood","html_url":"https://github.com/reywood","followers_url":"https://api.github.com/users/reywood/followers","following_url":"https://api.github.com/users/reywood/following{/other_user}","gists_url":"https://api.github.com/users/reywood/gists{/gist_id}","starred_url":"https://api.github.com/users/reywood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reywood/subscriptions","organizations_url":"https://api.github.com/users/reywood/orgs","repos_url":"https://api.github.com/users/reywood/repos","events_url":"https://api.github.com/users/reywood/events{/privacy}","received_events_url":"https://api.github.com/users/reywood/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T19:21:30Z","updated_at":"2015-10-02T19:21:30Z","body":"I explain why the transform is applied in [this comment](https://github.com/englue/meteor-publish-composite/issues/28#issuecomment-130012786) from #28."}}