会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
尾野
博客园
首页
新随笔
联系
管理
订阅
2020年7月28日
Mongoose基于MongoDB建模并设置关联
摘要: 一、模型关联 1.一对多/多对多 在一中关联多中的字段,type为 mongoose.Schema.Types.ObjectId ,并关联关联模型的名称。 1 const Categoryschema = new mongoose.Schema({ 2 name: { type: String },
阅读全文
posted @ 2020-07-28 22:43 尾野
阅读(515)
评论(0)
推荐(0)
编辑
公告