OPENUI5 ODataV4 SubStructure with Array Updates not working
OpenUI5 version: 1.48.0
Browser/version (+device/version): Chrome 58
Any other tested browsers/devices(OK/FAIL): FAIL
Steps to reproduce the problem:
- Given a OData V4 Source. The entity includes a property as Collection (Array)
- Binding to the entity, collection and its properties works. Data is shown on screen.
What is the expected result? When changing data in the bound GUI elements, data shall be updated in properties within collection.
What happens instead? Changes are reverted, it is not possible to update elements like /Core(key)/Collection/1/Name
Any other information? (attach screenshot if possible)
Hello!
This is indeed a limitation of the current version. Collection properties are not yet supported. There is a backlog item for this internally (CPOUI5UISERVICESV3-670) but we cannot make any commitments regarding a timeline.
Thanks for using OData V4!
Best regards, Thomas
Hello Jörg!
We would like to understand firsthand from our stakeholders how important certain features are. Feel free to comment on this one and explain what your workaround would be or whether this is a blocker or...
Thanks and best regards, Thomas
Hi,
Thank you for your support.
We use ODataV4 services which provide objects in a „self-contained“ approach. This includes substructures for e. g. localized information.
Our approach was to include this data as substructured arrays. We want to have changes being pushed “at once” to the server so going through referenced objects is not an approach.
Alternatives are:
-
Using OpenTypes and adding those elements of the array as substructures. This is currently our favorized workaround, however, requires CPOUI5UISERVICESV3-136 to be downported to the release available. -
Using a pseudo property which includes JSON notation of the overall substructure We would then extract it, store it in a local-only JSON Model and upon update, push it into the ODataV4 model. This is possible but introduces a fair amount of complexity into the solution.
Thanks, regards
Jörg Fischer
Hello Jörg!
We will downport CPOUI5UISERVICESV3-136 to 1.48, that's for sure.
Best regards, Thomas
P.S.: It looks like you reply via mail and thus my previous comment is repeated? That looks a bit strange.
Hi,
Cleaned up comments, sorry for that.
I do not want to be pushy, but do you have a time estimate for CPOUI5UISERVICESV3-136 for us to decide which way to go.
Thanks, regards
Jörg Fischer
CPOUI5UISERVICESV3-136 has been fixed in 1.48 with commit 78df2c2 but CPOUI5UISERVICESV3-670 is still open.
What's the status on support of Collections in aggregation bindings?
There is a recommendation from CAP to use "array of" / "many" in certain cases. This leads to a "Collection" and there is no support for this from UI5 (it seems).
@petermuessig
Related:
- https://answers.sap.com/questions/12972474/bind-and-display-collectionedmstring.html
- https://stackoverflow.com/questions/66426533/binding-the-array-property-from-an-odata-entity-to-an-aggregation
- https://answers.sap.com/questions/13207325/how-to-achieve-a-ui5-aggregation-binding-to-cds-ar.html
Hello @piejanssens !
There's no progress here, sorry.
Best regards, Thomas
Hi Thomas,
Is there UI5 documentation covering what is and isn't supported for ODATA V4 Collections? This would be useful.
Pieter
Hello Pieter!
Of course there is extensive documentation about UI5's OData V4 Model. As always, we document what is supported, not the other way around. Thanks a lot for your understanding.
Best regards, Thomas