Open raix opened 9 years ago
autocomplete uses golbal[collectionName]
There's also this SO question - http://stackoverflow.com/questions/10984030/get-meteor-collection-by-name
I've been preparing to do an extended collections API, because of the getTimestamp() issues; as well as exposing db.stats()
and db.serverStatus()
. I'd be more than happy to add .lookup()
. Although ETA is probably 3 months off still.
https://github.com/awatson1978/collection-extended-api/blob/master/README.md
I have some extensions to the API in directcollection package. One thing I am missing (from Django) is .exists()
query, which would make an optimized query and tell you if the query matches any document. Doing .count()
instead is very bad because you do not really need/want precise number (and counting a precise number is not very cheap in MongoDB).
In the meantime I've used in rubaxa:sortable and improved @dburles' mongo-collection-instances
I think this pull request which was recently merged could help a bit: https://github.com/meteor/meteor/pull/5845
I often find my self in having to wrap the Meteor.Collection in order to get a lookup option. I may have the collection name but currently there isnt a way to resolve the string into a collection?
Eg.