-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Global query filter warning raised for TPH entities #26216
Comments
Think this might get fixed for 6.0 or is it being backlogged? I can have a go at putting together a PR if that helps. edit: Have implemented a fix in fork, let me know if you want a PR raised in your repo, I understand you're close to wanting 6.0 pretty locked down. |
@stevendarby - We will likely to fix this in next release. While I agree this is a bug, but it is an incorrect warning, which user can either suppress (assuming all other warning of same kind are taken care of) or choose to ignore the warning. It can also be configured to just log rather than throw. So that way, this bug is not causing app to crash or not function properly. Hence it is not enough value to justify putting in 6.0. cc: @dotnet/efteam - if anyone feels otherwise. |
Thanks for taking the time to answer, that seems entirely reasonable to me, at least for 6.0.0. I have some quibbles and frustrations with the approach to bug fixing between major versions, but that's not for discussion here. Can certainly live with this one for another year (or two for LTS!) :) |
Following code raises a warning:
I believe this is incorrect. You can only configure a filter on the base type. The base type, Post, has a filter specified. This flows down to PicturePost, so should be enough to satisfy the warning condition, but EF Core doesn't seem to detect this in its heuristics. If you change the collection navigation on Blog to collection of Posts instead, the warning disappears.
EF Core version: 5.0, 6.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
The text was updated successfully, but these errors were encountered: