I have a publish function as follows:
Meteor.publish('tasks', function (name) {
var project = Projects.findOne({name: name});
return Tasks.find({projectId: project._id});
});
Now assume that at some point changes are made to Projects with the result that the above Projects.findOne
returns a different project and so the Tasks.find will return other tasks.
However the changes made to Projects doesn't republish the tasks
I've used reactivePublish, but it turns out the package has issues (and also does not have any unit tests). So, is there an easy way to make this publish function re-publish when project changes ?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…