new mongoose.Schema({
name: String,
posts: [{
title: String,
body: String,
}]
})
我会得到类似的东西
{
"_id": ObjectId("xxx"), // which is OK
"name": "xxx",
"posts": [{
"_id": ObjectId("yyy"), // which is what I dont want
"title": "ttt",
"body": "bbbb",
}]
}
我怎样才能让猫鼬不创建_id
内部帖子?