更新Azure DocumentDB中文档的一部分 [英] Updating part of a Document in 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.
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: