【发布时间】:2012-09-19 00:35:53
【问题描述】:
我的猫鼬架构:
mongoose.Schema({
title: 'string',
items: [{
uid: 'string',
type: {type: 'string'},
title: 'string',
items: [{uid: 'string', type: {type: 'string'}, text: 'string'}]
}]
});
如何告诉猫鼬项目(和项目的项目)不是文档,而只是嵌套对象?我既不需要 _id 属性,也不需要它们的任何文档功能,但我想定义它们并使用模式进行限制。
_id: false够了吗?
【问题讨论】:
标签: mongoose