question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bound Table not updated after createEntry on ODataModelv2 with deferred group

See original GitHub issue

Prerequisites:

  • 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:

  1. 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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
lucasheimcommented, Apr 17, 2019

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.

4reactions
uhlmannmcommented, Jan 22, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found