How to $push to an array, $sort ascending according to the date created and $slice it to the last 10 in a particular document in mongodb

前端 未结 0 1319
北海茫月
北海茫月 2020-12-21 04:33

I have been following the MongoDB subset pattern design. I have a product collection and a review collection. I want to include the recent 10 reviews in the product document

相关标签:
回答
  • 消灭零回复
提交回复
热议问题