Open kfkvamme opened 2 years ago
@kfkvamme It seems it's a regression change since 8.0.5.
As a workaround, you can change your codes to input a query settings.
query = (IQueryable<ReproItemApiModel>)odataQueryOptions.ApplyTo(query, new ODataQuerySettings { HandleNullPropagation = HandleNullPropagationOption.False });
@kfkvamme If possible, please help verify the latest nightly package.
@kfkvamme If possible, please help verify the latest nightly package.
I tested the 8.0.8 release, and as far as I can tell from a quick test, that appears to fix the issue.
OData Version
8.0.5-8.0.7
Description
When using something like
$filter=Relation/any(r: ...)
to filter on sub-lists in an endpoint that uses ODataQueryOptions.ApplyTo with v8.0.5 or newer, it always fails with an error like this:In version 8.0.4 and previous versions, this works fine.
Reproduction
Here's a simple minimal project reproducing the issue: AspNetCoreODataRepro.zip
Steps
https://localhost:7226/Repro?$filter=Relations/any(r: 1 eq 1)
using Postman or a similar tool, and you should see an error similar to the one shown above