我的猫鼬模式:
mongoose.Schema({
title: 'string',
items: [{
uid: 'string',
type: {type: 'string'},
title: 'string',
items: [{uid: 'string', type: {type: 'string'}, text: 'string'}]
}]
});
Run Code Online (Sandbox Code Playgroud)
如何告诉mongoose项目(和项目项目)不是文档,而只是嵌套对象?我既不需要_id属性也不需要任何文档的功能,但我想定义它们并使用模式进行限制.
是_id: false够吗?
mongoose ×1