Skip to content

$count in $filter on navigation property causes parser error (not supported?) #871

Description

@programador3c

Hi!

When attempting to use $count on a navigation property inside a $filter expression in an OData request, the service returns a parsing error instead of either handling the query or explicitly rejecting it as unsupported.

Request:
http://aicore.localhost:8002/odata/SpecialOrderProducts?$filter=etas/$count eq 0

Actual behavior

The service responds with:

{
"@context": "http://aicore.localhost:8002/odata/$metadata#SpecialOrderProducts",
"value": [
{
"OData-error": {
"code": "expression_parser_error",
"message": "Encountered an invalid symbol at: etas/>$<count eq 0",
"target": null,
"details": [],
"innererror": {}
}
}
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions