I have two publish methods for two different templates, however when I subscribe to each from different templates. The first template from the first publish method returns correctly, while the second does not, it also returns the first publish method rather than the second.
It should go to note that each method search the same collection but for different results.
To recap if I subscribe and call find query on âcollectionVariationOneâ in one template it works fine. But if I subscribe and call a find query on âcollectionVariationTwoâ from a different template. IT ALSO RETURNS THE VALUE FROM âcollectionVariationOneâ.
you also need to filter your client side collection with your userId, otherwise profileCollection.find() will return all published results from all subscriptions!
That does work if I remove the query from the server and have a empty find on the collection. But now that its not coming from the server doesnât that make my data vulnerable from the client?
Aah, itâs the same collection ⌠You may need to close the first subscription and then open the second one. Or if you want, push both data sets once (your publish function can also return an array of cursors, or a single query for both data sets)