on 10-11-2017 11:27 PM
I am creating a common save routine but I need to take a different action if the entity is an existing entity on the backend or if it is a new entity created by the createEntry. Is there a way to distinguish between these in the oData model? I would think that somewhere it must know so that it can call the backend differently to update or add new.
If you are using createEntry then the model will handle this for you. All you have to do is just use submitChanges, which will submit new entries as well as edits.
https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v2.ODataModel
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I considered that, however I'm creating a general purpose routine that could be used to address different object entities and I can't be certain that some entity might not have a similar format as the generated Id or that the current format for the generated id will not change in the future. I think the mDeferredRequest is more definitive so I'll go with that for now.
Thank you for your help with this.
Regards,
Mike
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.