SAPUI5 向变更集发送 oData 请求

SAPUI5 Send oData Request to Changeset

我想从我的 UI5 应用程序向后端的变更集发送批处理请求。我做了以下事情:

我在 segw 服务中创建了一个实体。在 "changeset_begin" 方法中,我将实体的 cv_defer_mode 设置为 true。

在前端我尝试向后端发送调用。但不知何故它不起作用,我无法在 ChangeSet 中设置断点。我的语法错了吗?非常感谢!

        oDataModel.create("/MyEntitySet", { // in a loop, values are changed
            properties: {
                Key: item[i].getKey(),
                Salesorder:"347854"
                Department: "HR"
            }
        });


        oDataModel.submitChanges({ // executed after loop
            success: function (oData) {
                oDataModel.refresh();
            }
        });

According to the API您要找的方法是createEntry.

Creates a new entry object which is described by the metadata of the entity type of the specified sPath Name. For each created entry a request is created and stored in a request queue. The request queue can be submitted by calling submitChanges