Enh. Req.: Please support content id referencing in sap.ui.model.odata.v2.ODataModel.create/createEntry, etc.
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.
+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
Thanks for this feature request, i will dispatch it to the colleagues responsible for this part of the framework.
Is there any update on this one? Is this enhancement request assigned to the right person?
+1 for this!
+1 for this!
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