I have have an app where I have 6 collections: tournaments, teams, players, schedule, rosters and memo
_id from tournaments collection’s can be found in all other five collections as tournament_id
I have Iron Router installed and when hitting the URL http://myip/_id, Iron Router sets _id for the session which acts as condition to all Mongo queries that I have created for my application.
This works ok, but I have created about 30 find() queries to process my data and make joinings, even I have only 5 collections to be used.
What I am looking for
I was thinking that
- when hitting the URL http://myip/_id
- I could used Iron Router to fetch these 5 five collection to browser’s memory, filtered by URL _id
This could be possible and fast, as when filter, each collection will have only 10-200 documents and each document only 5-10 fields inside.
But how I do it?