-
-
Notifications
You must be signed in to change notification settings - Fork 158
Bug: Filter passes query validation, but the filter is not applied #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I was looking into fixing this, but unfortunately the error is raised from within the query string parsing logic. Since I'm actually using the nested filtering construct for Elasticsearch-based resources (non-Entity Framework Core), I'll leave the bug in for now. |
This should be a fairly easy issue to pick up for anyone out there looking to make a first contribution. Indeed, it looks like a validation issue in the corresponding |
For my use case, it is unfortunate that the query validation logic is implemented apart from the resource-specific service that can or cannot provide nested includes. To overcome that, the I haven't tried, but maybe we can add a capabilities property to IFilterService or its base, and then have |
This works correctly for 1-to-1 relationships, but crashes on 1-to-many. filtered: /articles?include=author&filter[author.firstName]=John In addition to this, the filtering pass does not execute when getting by ID. discarded: /articles/1?include=author&filter[author.firstName]=John |
Description
Consider the request:
This request passes query validation, but the filter is not applied. It returns all collaborators. This is likely caused by EF Core not supporting filtered includes. In contrast, the next request:
returns the next error message:
which is helpful. I think the fix would be to return the same error message in this case, instead of silently ignoring the filter.
Environment
v4.0.0-alpha4
The text was updated successfully, but these errors were encountered: