Closed joaopiopedreira closed 9 years ago
It's probably possible... I assume that in your before.find you'd have to run the query against both collections, iterate over both result sets and push the docs to a new cursor that you then return instead.
Hi,
I've tried that, but didn't succeed in returning from the before.find function.
Something like; Collection1.before.find(function(...){ Return Collection1.find().fetch().concat(Collection2.find().fetch() })
But that doesn't work...
Have any ideas?
Many thanks,
João Pio Pedreira /// Sent from a mobile device ///
On 1 Sep 2015, at 19:44, Mathieu Bouchard notifications@github.com wrote:
It's probably possible... I assume that in your before.find you'd have to run the query against both collections, iterate over both result sets and push the docs to a new cursor that you then return instead.
— Reply to this email directly or view it on GitHub.
My apologies: before.find doesn't allow you to return an alternate cursor, it only allows you to modify the arguments by reference
Hi @matb33 ,
I have 2 collections (let's say coll an collStatic). coll is a standard meteor collection. collStatic is a client-only collection. They both have the same data schema.
When I run a find() or findOne() on "coll", I'd like to retrieve data from both "coll" and "collStatic".
Is this possible with collection-hooks?
Thanks.