Mongoose使用String类型填充

时间:2016-06-19 09:28:14

标签: javascript node.js mongodb mongoose mongoose-populate

我正在尝试将“类别”填充到“类别”模型中 使用 type:String 匹配类别架构中的 _id:String 但它返回“null”

我是以错误的方式使用它吗?

category.js和product.js category.js and product.js

index.js index.js

邮递员结果 postman

mongoDB中的产品数据 data in mongoDB

0 个答案:

没有答案