mongoDB子文档列表更新

来源:互联网 发布:java 中string replace 编辑:程序博客网 时间:2024/06/05 12:08

mongoDB子文档列表更新语句:


db.user.update({"_id" : ObjectId("55ebe8309ff9d8916fbc9fd8")}, {    $addToSet:{         "userAuth":{            $each:[              {                  "account" : "124585855645",                  "accountType" : 10222                                 }                          ]         }     }})


0 0
原创粉丝点击