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

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

问题描述

有没有办法更新 DocumentDB 集合中的部分文档?

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

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

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 的博客:http://weblogs.asp.net/scottgu/azure-new-documentdb-nosql-service-new-search-service-new-sql-alwayson-vm-template-and-更多

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

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/822d4b5c-13ce-4737-a1e9-6217851dfa9c/update-delete-parts-of-an-documentdb-object-graph-how-do-weak-relations-work?forum=AzureDocumentDB

这是来自 Microsoft 员工的评论,表示将在未来的更新中添加对部分文档更新的支持:

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

http://blogs.msdn.com/b/documentdb/archive/2014/08/22/introducing-azure-documentdb-microsoft-s-fully-managed-nosql-document-数据库服务.aspx

这篇关于在 Azure DocumentDB 中更新文档的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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