在Azure DocumentDB中更新文档的一部分

Kev*_*ess 12 azure nosql azure-cosmosdb

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

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

DocumentDB的处理ReplaceDocumentAsync方式是否使其表现得比表面看起来更好?

Tre*_*van 9

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

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-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-弱关系工作?论坛= AzureDocumentDB

以下是Microsoft员工的评论,声明将在以后的更新中添加对部分文档更新的支持:

http://blogs.msdn.com/b/documentdb/archive/2014/08/22/introducing-azure-documentdb-microsoft-s-fully-managed-nosql-document-database-service.aspx 博客评论

  • **_截至2017年4月仍无法使用._** (8认同)
  • 用户语音功能请求已于2018年3月5日更新:***Azure Cosmos数据库团队(管理员,Microsoft Azure)回复:我们正在积极致力于此功能.***.-华友世纪 (2认同)