Mongodb Update Many

后端 未结 2 502
盖世英雄少女心
盖世英雄少女心 2021-01-29 05:47

I am developing using express js and npm module mongodb with mongodb as database. I have two collections namely \"users\" and \"activities\". There can be 1000s of activities of

2条回答
  •  星月不相逢
    2021-01-29 06:29

    You should store just the _id of the User in the Activity. Then use that to access the User via the Activity (if that's what you want to do).

提交回复
热议问题