-
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
Exclude Object when checking for DbContext in query filters #18770
Conversation
@ajcvickers / @roji can you fill out the ask mode template with customer scenario, workarounds, etc? |
DescriptionSince 3.0, null constants in query filters get incorrectly parameterized and cause query translation failure unless compared against a type that defines an equality operator (==). Customer ImpactQuery failure when defining a query filter comparing either navigation properties to null, or non-navigation reference properties such as byte arrays, spatial types which don't define an equality operator. Filters that compare to null are common. How foundCustomer-reported (#18759) Test coverageWe had a test for an extremely close scenario, but unfortunately our test entity types define an equality operator (==), so the bug wasn't triggered. Regression?Yes, from 2.2. RiskRisk is very small - the fix is adding a single check to exclude Object in a visitor (to prevent the null constant from mistakenly being identified as the context type). |
Approved for GA. Please hold for branch to open. |
@smitpatel addressed in #18918 |
Fixes #18759
Ports #18761 to 3.1.