使用Spring数据mongo db更新数组字段

时间:2017-12-19 06:32:00

标签: database spring mongodb

我的mongoDB中有一个以下集合。

{
    "_id" : "5a0d994082909617400f101a",
    "Qusage" : [
    {
          "_id" : "5a0d994082909617400f501",
          "code" : "A",
          "QUESTION_SET" : {
                "ID" : "5a2dfbade11cd52d77039098",
                "TEMPLATENAME" : "AAA",
                "NAME" : "CCC",
                "QUESTION_SECTION" : [{
                    "A":"1"
                }]
            }

    },
    {
          "_id" : "5a0d994082909617400502",
          "code" : "A",
          "QUESTION_SET" : {
                "ID" : "5a2dfbade11cd52d77039095",
                "TEMPLATENAME" : "AAA",
                "NAME" : "CCC",
                "QUESTION_SECTION" : [{
                    "A":"1"
                }]
            }

    }]
}

如何更新“QUESTION_SET”下的所有值?

0 个答案:

没有答案