openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.ui.model.odata.v2.ODataModel.getServiceMetadata() not working

Open sfdfklskldf opened this issue 11 years ago • 2 comments

It seems not possible to load service metadata in sync with v2 ODataModel. In ODataModel code I detected following line: this.bLoadMetadataAsync = true; If I set the value to false (in debugger) the method works.

Using a parameter in the constructur has no effect. So it looks like a bug in the code and/or in the documentation.

Compare following pages:

  • https://openui5beta.hana.ondemand.com/docs/guide/6c47b2b39db9404582994070ec3d57a2.html
  • https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.model.odata.v2.ODataModel.html#hasPendingChanges

This problem seems to be true since SAPUI5 1.26.6 till current beta of OpenUI5.

My problem is to convert an application to use the new model but during the first step I need the metadata loaded in sync.

I would ask you to update the code and/or the documentation. See also: http://stackoverflow.com/questions/31938755/getting-service-metadata-of-sapui5-v2-odatamodel

sfdfklskldf avatar Aug 11 '15 14:08 sfdfklskldf

Hi,

i agree the documentation in the developer guide is mssleading - the async nature of getMetadata() is not described there.

I forwarded it to the responsible developer internal ticket reference: 1570807301

Best regards, Tobias

ghost avatar Aug 13 '15 10:08 ghost

Hi, loading the metadata synchronously is not supported with v2.ODataModel anymore due to blocking of UI. I will adapt the documentation. BR, Jan

loginger avatar Aug 31 '15 09:08 loginger