[英]How to perform deep update with the SAP Cloud SDK
We are currently trying for performance reasons to execute a deep update on an entity structure exposed as OData service using the SAP Cloud SDK.目前,出于性能原因,我们正在尝试使用 SAP Cloud SDK 对作为 OData 服务公开的实体结构执行深度更新。 From our understanding using the replacingEntity() strategy on the update request, we want to send the complete structure down to the OData service similar to what is described for the deep insert use case here:
根据我们对更新请求使用 replaceEntity() 策略的理解,我们希望将完整的结构发送到 OData 服务,类似于此处对深度插入用例的描述:
https://blogs.sap.com/2017/12/07/step-20-with-s4hana-cloud-sdk-create-and-deep-insert-with-the-virtual-data-model-for-odata/ https://blogs.sap.com/2017/12/07/step-20-with-s4hana-cloud-sdk-create-and-deep-insert-with-the-virtual-data-model-for-odata/
However, when doing so we noticed that only the entity fields are sent and none of the navigational properties.但是,这样做时,我们注意到仅发送实体字段,而没有发送任何导航属性。 Having debugged/browsed through the SDK this seems to be the intended behaviour as can be seen in the following method:
通过 SDK 调试/浏览后,这似乎是预期的行为,如以下方法所示:
com.sap.cloud.sdk.s4hana.datamodel.odata.helper.FluentHelperUpdate.getQueryBuilder() {
[...]
final Map<String, Object> fieldsForUpdate = getFieldsForUpdate(); // does not include navigations
[...]
}
Is there some configuration option when making the request for making a deep update?请求进行深度更新时是否有一些配置选项? Or is one supposed to retreat to batch requests to the backend instead?
还是应该退回到后端的批处理请求? In case this is not a supported a remark whether this is on the roadmap would also be greatly appreciated!
如果这不是一个支持的评论,是否在路线图上也将不胜感激!
At the time of this writing, the SAP Cloud SDK for Java does not provide the functionality "deep update".在撰写本文时,Java 的 SAP Cloud SDK 不提供“深度更新”功能。 I will update this answer if this feature will be covered.
如果涵盖此功能,我将更新此答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.