openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

OPENUI5 ODataV4 SubStructure with Array Updates not working

Open JFischerCN opened this issue 9 years ago • 10 comments

OpenUI5 version: 1.48.0

Browser/version (+device/version): Chrome 58

Any other tested browsers/devices(OK/FAIL): FAIL

Steps to reproduce the problem:

  1. Given a OData V4 Source. The entity includes a property as Collection (Array)
  2. 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)

JFischerCN avatar May 16 '17 11:05 JFischerCN

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

ThomasChadzelek avatar May 17 '17 07:05 ThomasChadzelek

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

ThomasChadzelek avatar May 17 '17 14:05 ThomasChadzelek

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:

  1.  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.
    
  2.  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

JFischerCN avatar May 18 '17 10:05 JFischerCN

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.

ThomasChadzelek avatar May 18 '17 10:05 ThomasChadzelek

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

JFischerCN avatar May 18 '17 10:05 JFischerCN

CPOUI5UISERVICESV3-136 has been fixed in 1.48 with commit 78df2c2 but CPOUI5UISERVICESV3-670 is still open.

ThomasChadzelek avatar May 22 '17 11:05 ThomasChadzelek

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

piejanssens avatar Mar 01 '21 17:03 piejanssens

Hello @piejanssens !

There's no progress here, sorry.

Best regards, Thomas

ThomasChadzelek avatar Mar 02 '21 08:03 ThomasChadzelek

Hi Thomas,

Is there UI5 documentation covering what is and isn't supported for ODATA V4 Collections? This would be useful.

Pieter

piejanssens avatar Mar 02 '21 08:03 piejanssens

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

ThomasChadzelek avatar Mar 02 '21 08:03 ThomasChadzelek