javascript - mongoose 怎么插入嵌套数组?
PHPz
PHPz 2017-04-17 16:32:09
0
1
602
PHPz
PHPz

学习是最好的投资!

reply all(1)
黄舟

If I understand your idea correctly, FYI:

1. The ref of Mongoose schema is mainly used to facilitate the association between multiple collections in queries: populate;

2. When inserting data, you need to handle the insertion logic yourself, insert different collections separately, and keep the ObjectId of the ref in different collections consistent

For reference.

Love MongoDB! Have fun!


MongoDB Online Lecture Series 19- MongoDB 10 steps to build a single view

It’s April 19th, please click:>---<

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template