更新Azure DocumentDB中文档的一部分 [英] Updating part of a Document in Azure DocumentDB

查看:50
本文介绍了更新Azure DocumentDB中文档的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以更新DocumentDB集合中的部分文档?

Is there a way to update part of a document in a DocumentDB collection?

我知道ReplaceDocumentAsync允许您更新文档,但是您必须替换 entire 文档.这听起来有点吓人.如果我有一个嵌套了其他对象的对象,则必须查询父文档,然后替换整个文档以更新该对象的嵌套部分.

I know that ReplaceDocumentAsync lets you update a document, but you have to replace the entire document. This sounds kind of scary. If I have an object that has other objects nested I will have to query for the parent document and then replace the entire document to update a nested part of the object.

DocumentDB处理ReplaceDocumentAsync的方式是否比表面上看起来更好?

Does DocumentDB handle ReplaceDocumentAsync in a way that makes it perform better than it might seem on the surface?

推荐答案

不幸的是,到目前为止,这是不可能的.您可以在Microsoft Azure用户语音页面上对建议进行投票.

Unfortunately, as of now, this is not possible. You can vote up the suggestion on the Microsoft Azure User Voice page.

http://feedback.azure.com/forums/263030-documentdb/suggestions/6693091-be-able-to-do-partial-updates-on-document

Scott Guthrie的博客:

Scott Guthrie's Blog: http://weblogs.asp.net/scottgu/azure-new-documentdb-nosql-service-new-search-service-new-sql-alwayson-vm-template-and-more

以下是Microsoft员工的评论,指出将来的更新中将添加对部分文档更新的支持:

Here is a comment from a Microsoft employee, stating that support for partial document updates will be added in a future update:

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆