Skip to content

Java function and $expand functionality - Empty response #284

@sahashmi

Description

@sahashmi

Created OData Java function which returns collection of entity X. Entity X has one-to-many relationship - entity Y. Java function call is working. But, ../function()?$expand=Y is not working properly because Y is coming empty even relationship data exists in Y:

This is the request:
.../odata/v1/function(pk='1')?$format=application/json;odata.metadata=full&$expand=Y

here is the response:

{
"@odata.context": "http://localhost:8000/odata/v1/$metadata#Collection(com.odata4.X)(Y())",
"value": [
{
"@odata.type": "#com.odata4.X",
"@odata.id": "'1'",
"Column": "Name",
"Y": []
}
]
}

It should support $expand - I can see in debugger than Y is populated but relationship is not processed by JPAOperationRequestProcessor.java

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions