I have this publication with join transformation
export var Posts = new Mongo.Collection<Post>(‘posts', {
transform: function(doc) {
doc.user = Meteor.users.findOne(doc.userId);
doc.category = Categories.findOne(doc.categoryId);
return doc;
}
});
this works well with autopublish, but without it, category object is undefined, can someone help me understand why?
note: Yes I published and subscribed to posts and categories, and I am getting the joint user object, but not the category object.