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
内部の投稿を作成しないようにできますか?