var Embedded = new Schema({
some: String
})
var Main = new Schema({
other: String,
em: [Embedded]
})
在 Main.save({other:1, em:[{some:2}]})mongoose
添加对象 {other:1, em:[{some:2,"_id" : ObjectId("51f6d89a6269170000000039")}]} 到数据库。
我可以对猫鼬说不要将 _id 添加到嵌入式文档吗?