Skip to content

Support for expand query when filtered on collection field using lambda #325

Closed
@ghost

Description

For version 2.1.1, the following queries was tried for a Products entity, where we expand ProductDetails with at least one ProductDetailSources as catalogue.

http://localhost:8080/odata/Products?$expand=ProductDetails($filter=ProductDetailSources/any(p:p eq 'catalogue'))
http://localhost:8080/odata/Products?$filter=ProductId eq 358&$expand=ProductDetails($filter=ProductDetailSources/any(p:p eq 'catalogue'))

Query explanation

  • Products is an entity. It contains a navigational property to ProductDetails.
  • ProductDetails is another entity.
  • ProductDetails contains ProductDetailSources which is a collection of Strings.

Issue
A NullPointerException occurs while constructing query. In JPAExistsOperation.get() the query shows null in this.getExistsQuery().query(). Further analysis shows that pathList of JPAExistsOperation.determineAssociations() is empty for our above sample queries.

Closest analogous query using entities in this repo Organizations?$expand=SupportEngineers($filter=InhouseAddress/any(p:p/Building eq '1'))

Could you please help us confirm whether the feature of expanding a query, when filtered on a collection field using lambda, is supported?

image

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