文档结构如下-
{
"nestedDocArray" : [
{
"a" : "a",
"b" : "b",
"c" : "c",
"createdOn" : ISODate("2018-06-19T08:38:34.228Z")
},
{
"a" : "a1",
"b" : "b1000",
"c" : "c1",
"createdOn" : ISODate("2018-06-19T08:38:34.233Z")
},
{
"a" : "a1000",
"b" : "b1000",
"c" : "c1000",
"createdOn" : ISODate("2018-06-21T10:54:30.679Z")
}
]
}
如果我尝试在单个更新语句中对相同的nestedDocArray属性执行$ push,$ pull和$ set,则会导致异常“更新路径'nestedDocArray'将在'nestedDocArray'上造成冲突”“ < / p>