Continuing the discussion from Nested document not reactive:
I’m trying my make my publish function reactive when relationships change - in some cases, the ParentCollection.childID
field may change but the published content is not automatically updated to reflect this change.
Meteor.publish('nestedExample', function() {
var child_ids = _.pluck(ParentCollection
.find({}, {fields: {childID: 1}})
.fetch(), 'childID');
return [
ParentCollection.find({}),
ChildCollection.find({_id: {$in: child_ids}}),
];
});
Any idea how to make that part reactive?