插入也包含子文档的文档.我是通过cli这样做的.如何让mongodb为Alerts子文档记录生成对象ID?我想要类似下面的东西,但这不适用于cli.
db.user.insert(
{
"Email" : "andy+5@domain.com",
"Domain" : "other",
"Type" : "local",
"FName" : "Andy",
"Alerts" : [
{
"_id" : new ObjectId(),
"Keyword" : "sales",
"Frequency" : {
"Type" : "daily"
},
"IsActive" : true
},
{
"_id" : new ObjectId(),
"Keyword" : "customer service",
"Frequency" : {
"Type" : "daily"
},
"IsActive" : true
}
]
}
)
Run Code Online (Sandbox Code Playgroud) 我需要让 SAM 部署使用特定的 aws 配置文件。你在哪里设置呢?此 aws 配置文件承担部署所需的角色。