Skip to content

ODataModelV2: Calling a function that returns an array of Strings results in an error #4360

@chott92

Description

@chott92

What is the issue and how can we reproduce it?

When Using a sap.ui.model.odata.v2.ODataModel to call an OData Function on an OData V2 Service that returns an Array of Strings, the result will not be parsed correctly in the OData Model and result in a JavaScript Error on Client Side.

A Reproducing example (with instructions for setup) can be found here: https://github.com/chott92/openui5-sample

From what I did analyze on my own, it appears that with String Arrays, the Model takes one recursive step too far into the result parsing, resulting in calling a each() on the Strings themselves, which results in the error shown on the JavaScript Console.

Which OpenUI5 version is your project targeting?

1.96, 1.136 (reproduced on both)

Is the issue device- or browser-specific?

The Issue Seems not to be browser specific, since it appears to be located directly in the JavaScript Code of the ODataModel.

Confirmation

  • I have searched the existing issues and reviewed the relevant documentation as well as the API reference.
  • I am not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions