简体   繁体   English

如何使用 SAP Cloud SDK 执行深度更新

[英]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.

相关问题 如何使用 SAP Cloud SDK 3.2.0 在 Java 中检索目标? - How to retrieve a destination in Java with SAP Cloud SDK 3.2.0? 使用 SAP Cloud SDK 3.2.0 版向 OData 服务发送 POST 请求时如何避免 DestinationAccessException - How to avoid a DestinationAccessException when sending a POST request to an OData service using SAP Cloud SDK version 3.2.0 如何在 SAP WebIDE 中调用 SAP GW create_deep_entity method()? - How to call SAP GW create_deep_entity method() in SAP WebIDE? 使用 SAP Cloud SDK 版本 3.2.0 向 OData 服务发送 POST 请求 - Send POST request to OData service using SAP Cloud SDK version 3.2.0 如何从SAP Cloud Platform中的NodeJS使用目标 - How to consume Destination from NodeJS in SAP Cloud Platform 需要帮助设置我的(java)Odata服务以通过SDK将二进制文件发送到我的SAP系统(更新) - Need help setting up my ( java) Odata service to send binaries via the SDK to my SAP system (Update) SAP Cloud Platform:OData设置。 如何为外部用户设置? - SAP Cloud Platform: OData provisioning. How do I setup for an external user? 使用多租户 SAP Cloud Platform 应用程序时出错 - Error while working with Multi Tenant SAP Cloud Platform application 使用 Sap 云套件的 Odata 服务消费 ios - Odata service consumption using Sap cloud kit for ios 访问 SAP Cloud Platform:使用基本身份验证的 OData 供应 - Access SAP Cloud Platform: OData provisioning using Basic Authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM