meteor-subscription-scope icon indicating copy to clipboard operation
meteor-subscription-scope copied to clipboard

Provide way to obtain scoped collections

Open mitar opened this issue 9 years ago • 1 comments

Maybe something like subscriptionHandle.collection[collectionName].find() would be the same as collection.find(subscriptionHandle.scopeQuery()).

I am not sure if this is really the best approach because subscriptions can be for multiple collections and then you have to know how to map to collections. With current approach with scopeQuery we do not care for which collection a document is. This is left to the developer to use properly.

Maybe useful: https://github.com/tmeasday/cursor-utils

mitar avatar Dec 23 '15 12:12 mitar

See also discussion here: https://github.com/meteor/guide/issues/33#issuecomment-151716789

mitar avatar Dec 23 '15 12:12 mitar