if I got a collection for storing Articles with it’s Comments embedded, when retriving data from db, I will get a Article object with a completely Comment list, support there are a lot of comments, so this could be a problem of loading efficience, how can I handler this by paging Comments? do I have to use a seperate collection for Comments? or what else? thanx in advance.
if I got a collection for storing Articles with it’s Comments embedded, when retriving
Share
You looking for the $slice operator.
To retrieve comments by paging you need code like this:
This operation will return articles with only sliced comments. )