search

Home  >  Q&A  >  body text

javascript - mongoose 怎么插入嵌套数组?

PHPzPHPz2863 days ago605

reply all(1)I'll reply

  • 黄舟

    黄舟2017-04-17 16:34:09

    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:>---<

    reply
    0
  • Cancelreply