sap.ui.model.odata.v2.ODataModel.getServiceMetadata() not working
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
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
Hi, loading the metadata synchronously is not supported with v2.ODataModel anymore due to blocking of UI. I will adapt the documentation. BR, Jan