Bound Table not updated after createEntry on ODataModelv2 with deferred group
See original GitHub issuePrerequisites:
- An XML view with a
sap.m.Table
bound to an entity set of a ODataModel v2. - Two-way-binding activated
- Deferred group = ‘groupId’
- Change set = ‘changeSetId’
Reproduction steps:
- Add a new entity to the OData model using
oModel.createEntry({groupId: 'groupId', properties: ...})
What is the expected result?
- The bound table should show the newly created entry.
What happens instead?
- The bound table does not show the newly created entry.
I can see in the ODataModel that the entry exists with a local id and properties are set correctly. But my table is not updated to reflect the data. Only after calling oModel.submitChanges()
on the ODataModel, which goes to the backend OData service, these changes will show up in the table.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Issue when using createEntry in V2 OdataModel
Hi SAPUI5 experts, I have a requirement to add new entries in a table.I used sap.ui.model.odata.v2.ODataModel directly for binding.
Read more >OData V2 Model - Documentation - Demo Kit - SAPUI5 SDK
This parameter is used to update list bindings with the new entity after creation, so that it is displayed in the bound table...
Read more >What is the proper way to add records to a V2 odata model ...
The table is displaying all records, and when clicking on a record, I am using setBindingContext to bind the selected table record to...
Read more >The OData V2 Model enables binding of controls to data from ...
The following table shows the supported features for both OData models: ... The deferred batch group must then be submitted manually by means...
Read more >V2 vs. V4 - DSAG's UI5 Best Practice guide
Information in the metadata document is not repeated in the response. none : The response ... OData V4 adds a new flexible search...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Plus one. We are having the exact same problem in our development right now, and searching through SAP Blogs, questions and archives show that several people have been facing this for years. Having to throw data from ODataModel to JSONModel just to be able to do these operations feels wrong.
Hi @one-github , @lucasheim , @rauar and @i328935 ,
the functionality you request is available with the OData V4 Model, please see API documentation: sap.ui.model.odata.v4.ODataListBinding.create. In case your service can be exposed also as OData V4 and all required features are available with OData V4 (see the restriction at the beginning of the documentation on the OData V4 Model) I recommend to go with the OData V4 Model.
As to enhancing the OData V2 Model, I have rather bad news. The enhancement will be rather complicated and thus time consuming. In the next months, probably the whole year, we would not have time to work on this requirement.
Best regards Mathias.