I am trying to figure out how to use mongoose-joins for Node.js. I have tried looking at the ReadMe file, it only explains how set it up. Is there any sample code for actually joining two collections of data?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe DBRefs provide enough functionality for you. These are standard in the current release of Mongoose (2.4.10 as of this writing.)
With a DBRef, you can point to another document, and let Mongoose retrieve that document for you and ‘link’ it to the instance of the current document.
If you need more elaborate join-functionality, the mongoose-joins is probably the way to go.