how to get recursively all objects attached to a model in mongoose how to get recursively all objects attached to a model in mongoose mongoose mongoose

how to get recursively all objects attached to a model in mongoose


Have you looked at Mongoose's support for population?

For example:

Vote.find().populate('candidates').exec(callback);

will populate the candidates array with the full Candidate object for each id.