是否存在从15更新sc的查询,对于_id 1的id为2的数组元素,请说17?我在mongodb中有这个结构:
{ _id: 1,
lb: [
{
id: 2,
sc: 15
},
{
id: 3,
sc: 16
}
]
}
{ _id: 2,
lb: [
{
id: 5,
sc: 34
},
{
id: 6,
sc: 12
}
]
}
Run Code Online (Sandbox Code Playgroud)
我还有一个:有没有办法写一个查询来更新你刚才说的,如果没有更新id的数组元素,插入一个新的.我不想做两个查询 - 首先检查元素是否存在并更新它,第二个是在没有这样的情况下附加它.将它附加到一个查询中会很好.谢谢. - user3045201 1小时前
有没有办法在演员主管的SupervisorStrategy中获得消息?我的意思是导致演员失败的那个.我想从中获取一些数据.
我有一个配置文件:
app {
system {
action-type = "REST"
}
}
roles = [${app.system.action-type} "notifier"]
Run Code Online (Sandbox Code Playgroud)
我希望角色有一个值 [ RESTnotifier ],但这种方法给了我一个例外。有什么建议?
com.typesafe.config.ConfigException$NotResolved: need to Config#resolve() each config before using it, see the API docs for Config#resolve()
Run Code Online (Sandbox Code Playgroud)