Skip to content

FunctionImport cannot have Integer parameters #21

@TiloEilebrecht

Description

@TiloEilebrecht

If I have a parameter to a FunctionImport of type Integer, a call to the function import throws a IllegalArgumentException.

Here is the Function Import:

@EdmFunctionImport(name = "AssignedScopes", returnType = @ReturnType(type = Type.COMPLEX, isCollection = true)) public List<AssignedScopes> assignedScopes( @EdmFunctionImportParameter(name = "IdProfile", type = EdmType.INT32) Integer idProfile) {

I call it with URL /AssignedScopes?IdProfile=1. Apparently the parameter internally gets converted into a Byte. The call to invoke then fails, it does not automatically convert from Byte to Integer.

It works if the parameter has the type "int". However it should be an optional parameter which can be null. For this I need the type Integer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions