{"action":"created","issue":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/749","labels_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/749/labels{/name}","comments_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/749/comments","events_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/749/events","html_url":"https://github.com/Urigo/angular-meteor/issues/749","id":110436405,"number":749,"title":"How can i make a reactive Join between two Collections","user":{"login":"dyaa","id":4283185,"avatar_url":"https://avatars.githubusercontent.com/u/4283185?v=3","gravatar_id":"","url":"https://api.github.com/users/dyaa","html_url":"https://github.com/dyaa","followers_url":"https://api.github.com/users/dyaa/followers","following_url":"https://api.github.com/users/dyaa/following{/other_user}","gists_url":"https://api.github.com/users/dyaa/gists{/gist_id}","starred_url":"https://api.github.com/users/dyaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyaa/subscriptions","organizations_url":"https://api.github.com/users/dyaa/orgs","repos_url":"https://api.github.com/users/dyaa/repos","events_url":"https://api.github.com/users/dyaa/events{/privacy}","received_events_url":"https://api.github.com/users/dyaa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-10-08T12:19:59Z","updated_at":"2015-10-24T20:15:13Z","closed_at":null,"body":"I have two Collections `Articles` and `Categories` let's say their documents are like this\r\n\r\n**Article**\r\n\r\n    {\r\n       \"_id\": \"blabla\",\r\n       \"title\" : \"title\",\r\n       \"description\" : \"description\",\r\n       \"categoryId\" : \"catId\"\r\n    }\r\n\r\n**Category**\r\n\r\n    {\r\n       \"_id\": \"catId\",\r\n       \"title\" : \"category\",\r\n       \"description\" : \"description\"\r\n    }\r\n\r\nI want to make a subscription to make them like this\r\n\r\n    {\r\n       \"_id\": \"blabla\",\r\n       \"title\" : \"title\",\r\n       \"description\" : \"description\",\r\n       \"category\" : {\r\n           \"title\" : \"category\",\r\n           \"description\" : \"description\"\r\n       }\r\n    }\r\n\r\nI tried using [publish-composite][1] and here it's my code.\r\n**Server**\r\n\r\n    Meteor.publishComposite('articles', {\r\n    \tfind: function() {\r\n    \t\treturn Articles.find({}, { sort: {}, limit: 10 });\r\n    \t},\r\n    \tchildren: [\r\n    \t\t{\r\n    \t\t\tfind: function(article) {\r\n    \t\t\t\treturn Categories.findOne({ _id: article.categoryId });\r\n    \t\t\t}\r\n    \t\t}\r\n    \t]\r\n    });\r\n\r\n**And the client angularjs Controller is** \r\n\r\n    angular.module(\"dee\").controller(\"ArticlesListCtrl\", ['$scope', '$meteor', function($scope, $meteor){\r\n    \t$scope.articles = $meteor.collection(Articles).subscribe('articles');\r\n    }]);\r\n\r\nand the **view** is\r\n\r\n    {{ articles | json }}\r\n\r\nthe problem is it prints the article collection only without the relation.\r\n\r\nHere's the [Stackoverflow Question][2] \r\n\r\n\r\n\r\n\r\n  [1]: https://atmospherejs.com/reywood/publish-composite\r\n  [2]: http://stackoverflow.com/questions/33014849/using-publish-composite-with-angular-meteor?stw=2"},"comment":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/comments/150847312","html_url":"https://github.com/Urigo/angular-meteor/issues/749#issuecomment-150847312","issue_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/749","id":150847312,"user":{"login":"Namek","id":31058,"avatar_url":"https://avatars.githubusercontent.com/u/31058?v=3","gravatar_id":"","url":"https://api.github.com/users/Namek","html_url":"https://github.com/Namek","followers_url":"https://api.github.com/users/Namek/followers","following_url":"https://api.github.com/users/Namek/following{/other_user}","gists_url":"https://api.github.com/users/Namek/gists{/gist_id}","starred_url":"https://api.github.com/users/Namek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Namek/subscriptions","organizations_url":"https://api.github.com/users/Namek/orgs","repos_url":"https://api.github.com/users/Namek/repos","events_url":"https://api.github.com/users/Namek/events{/privacy}","received_events_url":"https://api.github.com/users/Namek/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T20:15:13Z","updated_at":"2015-10-24T20:15:13Z","body":"Thanks @netanelgilad I thought it fetches all Comments ever existing and then filters them on the client side for certain parent Post but I made few little tests by looking at meteor's websocket communication and it seems reliable (or I tested it wrong)."}}