PUT 操作不支持深度更新

发布于 2024-10-14 12:22:10 字数 216 浏览 5 评论 0原文

为什么.Net DataServices (Astoria) 不支持深度更新,但启用深度插入? 如何通过AJAX更新对象图?

http://msdn.microsoft.com/en-us/library/cc907912.aspx

Why .Net DataServices (Astoria) doesn't support deep updates, but enable deep inserts?
How to update object graph through AJAX?

http://msdn.microsoft.com/en-us/library/cc907912.aspx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

习惯成性 2024-10-21 12:22:10

一起进行更新的唯一原因是性能和更新全部或全部不更新的情况,这两者都是通过将所有更新批处理为一个请求来实现的。

是否有原因无法使用批处理来更新对象图?

谢谢
普拉蒂克

The only reason for doing updates together is performance and update all or nothing scenarios, both of which are achieved by batching all the updates as one request.

Is there a reason why you cannot use batch to update the object graph?

Thanks
Pratik

从此见与不见 2024-10-21 12:22:10

请参阅Vitek Karas 在 MSDN 上的回答

复制:(他提到的问题是人们为了理解为什么深度更新在语法必须携带的语义方面很复杂而提出的问题)

一些问题:

  • 如果内部 Feed 仅包含一项,客户是否希望仅添加该项,或者是否意味着还要从导航中删除所有其他项?

  • 如果内部提要包含集合中已存在的项目,则可能意味着要更新它,但是集合中的其他项目又如何呢?应该删除它们吗?

  • 如果上面两个问题的答案是“不删除”,那么如何使用“深度更新”方法从集合中删除项目?

  • 如果有一种方法使用“深度更新”从集合中删除项目,这是否意味着仅从导航中删除该项目,或者也完全删除该项目?

您可以使用批处理将多个请求作为一个请求来提交来克服这一问题。

See this answer by Vitek Karas on MSDN.

Copy: (the questions he refers to are questions one would ask to understand why deep updates are complex with regard to the semantics their syntax must carry)

Some of the questions:

  • If the inner feed only contains one item, did the client wanted that item to be added only, or did it mean to also remove all the other items from the navigation?

  • If the inner feed contains an item which is already present in the collection, it probably means to update it, but what about the other items in the collection. Should they be removed?

  • If the answer to the top two questions above is to "not remove", how do I remove an item from the collection using the "deep update" method then?

  • If there's a way using the "deep update" to remove an item from the collection, does it mean to just remove the item from the navigation, or also delete the item completely?

You could use batch to submit multiple requests as one to overcome this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文