openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Enh. Req.: Please support content id referencing in sap.ui.model.odata.v2.ODataModel.create/createEntry, etc.

Open DerGuteWolf opened this issue 10 years ago • 6 comments

cf. http://scn.sap.com/community/developer-center/front-end/blog/2016/02/20/creating-hierarchical-data-using-content-id-referencing-in-a-change-set-batch-request-in-hybrid-application This is needed since Kapsel Offine does not support create deep across 1:N navigation. The workaround from the blog needs to use __ stuff which is not so nice..., please provide a standard way. Eg both create and createEntry bark on the $1 in the front of the path.

DerGuteWolf avatar Apr 28 '16 12:04 DerGuteWolf

+1 for this! Also, this SCN article series by Kenichi Unnai is a great source of information: http://scn.sap.com/docs/DOC-70603

Content-ID is a standard in the OData Spec. Not having support for this can lead to nasty UI5 code and issues related to "transaction security" (LUW, "all or nothing,...").

Furthermore, I'd love to see this working also for file uploads using the FileUploader, see http://scn.sap.com/thread/3899879

nzamani avatar May 09 '16 12:05 nzamani

Thanks for this feature request, i will dispatch it to the colleagues responsible for this part of the framework.

Michadelic avatar Jul 14 '16 13:07 Michadelic

Is there any update on this one? Is this enhancement request assigned to the right person?

nzamani avatar Mar 14 '17 06:03 nzamani

+1 for this!

KarelVerbanck avatar Mar 30 '17 09:03 KarelVerbanck

+1 for this!

r1mar avatar May 23 '17 08:05 r1mar

Hi, in fact create should work. Please try the following:

... var oModel = new sap.ui.model.odata.v2.ODataModel(url); oModel.create("/Products", {}, {headers:{"content-ID":1}}); oModel.create("/$1/Suppliers", {}); ...

The Content-ID is set as a header. This does not quite confirm to the official V2 OData specification, but as long as your service could handle this Content-ID header it should work.

createEntry doesn't work. We have no plans to add this feature to the v2.ODataModel.

BR, Jan

loginger avatar Aug 25 '17 14:08 loginger