Skip to content
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

Add warning when multiple HasQueryFilter()'s are present for the same entity #24438

Closed
ilohnesimmediac opened this issue Mar 18, 2021 · 1 comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. customer-reported

Comments

@ilohnesimmediac
Copy link

Per HasQueryFilter()'s documentation:

It is currently not possible to define multiple query filters on the same entity - only the last one will be applied. However, you can define a single filter with multiple conditions using the logical AND operator (&& in C#).

This is reasonable. However, in some cases, a fairly difficult conclusion to arrive at. I recently spent a considerable amount of time trying to debug why my filters weren't applying, as I had one written for my soft delete flag, and one for my Stripe Id field.

It'd be really nice if there was a warning thrown for this, I'm sure it would save future developers a ton of pain.

Thanks.

@ajcvickers
Copy link
Member

@ilohnesimmediac Thanks for the suggestion. This could be useful, although its questionable that these should be warnings, but rather than spend time doing this we want to improve global query filters as tracked by #21459

@ajcvickers ajcvickers added closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. and removed type-enhancement labels Mar 23, 2021
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. customer-reported
Projects
None yet
Development

No branches or pull requests

2 participants