Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DerGuteWolf opened this issue Apr 28, 2016 · 6 comments

Comments

Projects
None yet
7 participants
@DerGuteWolf
Copy link

commented Apr 28, 2016

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.

@christianegoebels christianegoebels self-assigned this Apr 28, 2016

@nzamani

This comment has been minimized.

Copy link
Contributor

commented May 9, 2016

+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

@Michadelic

This comment has been minimized.

Copy link
Contributor

commented Jul 14, 2016

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

@nzamani

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2017

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

@KarelVerbanck

This comment has been minimized.

Copy link

commented Mar 30, 2017

+1 for this!

@richard-martens

This comment has been minimized.

Copy link

commented May 23, 2017

+1 for this!

@loginger

This comment has been minimized.

Copy link
Contributor

commented Aug 25, 2017

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 loginger closed this Aug 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.