Answer the question
In order to leave comments, you need to log in
Is it possible to make a nested query in mongo against another table?
for example, there is a collection of events [{id:"4e2f2af16f1e7e4c2000000a",name:"First event", date:ISODate("2011-07-26T21:02:19Z")}, ... ]
and there is a collection of reviews [id:"" ,event:"4e2f2af16f1e7e4c2000000a",score:5]
get
[{id:"4e2f2af16f1e7e4c2000000a",name:"First event", date:ISODate("2011-07-26T21:02:19Z"), reviews :[id: "",event:"4e2f2af16f1e7e4c2000000a",score:5]}, ... ]
so that you can later bind to a collection in meteorjs
Answer the question
In order to leave comments, you need to log in
There are no joins in the mongo itself, but you can store reviews directly in events.
1. Desperately break with the past in the form of relational databases and heroically switch to MongoDB (NoSQL - stylish, fashionable, youthful).
2. Ask a question on Toaster (Stack Overflow, [email protected], etc) how to do JOINs in MongoDB.
3.???
4. PROFIT!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question