Answer the question
In order to leave comments, you need to log in
How to make a recursive populace?
There is a scheme comment
, with a field replies
in which there are others comment
, which can also have replies
, and so on ad infinitum.
Post.findOne({slug}).populate({path: 'comments', populate: {path: 'replies', populate: {path: 'replies'}}}).exec()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question