[release/10.0] Fix named query filter conventions#37738
Merged
AndriySvyryd merged 4 commits intorelease/10.0from Feb 21, 2026
Merged
[release/10.0] Fix named query filter conventions#37738AndriySvyryd merged 4 commits intorelease/10.0from
AndriySvyryd merged 4 commits intorelease/10.0from
Conversation
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Port changes from EF Core PR 37710
Port #37710: Fix named query filter override from convention
Feb 18, 2026
Member
AndriySvyryd
left a comment
There was a problem hiding this comment.
@copilot Update progress by rewriting the PR summary using this template:
Fixes #{number}
**Description**
{Issue description}
**Customer impact**
{How does the reported issue affects customer's app? Are there workarounds?}
**How found**
{Was it customer reported or found during verification? How many customers are affected?}
**Regression**
{Is it a regression from a released version? Which one?}
**Testing**
{How the changes were tested}
**Risk**
{Low/Medium/High, argument why}
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Contributor
Author
Done. The PR description has been updated using the servicing template. |
There was a problem hiding this comment.
Pull request overview
Ports the EF 10 fix for named query filter override behavior so that filters added by conventions can be overridden by explicit user configuration during model building.
Changes:
- Set
ConfigurationSource.Explicitwhen creating namedQueryFilterinstances viaEntityTypeBuilder.HasQueryFilter(string, ...). - Add a regression test validating convention-set named filters can be overridden via the public API.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/EFCore/Metadata/Builders/EntityTypeBuilder.cs | Ensures named query filters created through the public builder carry ConfigurationSource.Explicit, enabling proper override semantics. |
| test/EFCore.Tests/Metadata/Internal/InternalEntityTypeBuilderTest.cs | Adds coverage for overriding convention-set named query filters via explicit configuration. |
test/EFCore.Tests/Metadata/Internal/InternalEntityTypeBuilderTest.cs
Outdated
Show resolved
Hide resolved
artl93
approved these changes
Feb 18, 2026
Member
artl93
left a comment
There was a problem hiding this comment.
New feature. Customer reported. Approved.
roji
approved these changes
Feb 19, 2026
…est.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #37708
Port of #37710
Description
Named query filters set by conventions cannot be overridden by explicit configuration in user code because of a missing
ConfigurationSourcein the implementation.Customer impact
Customers who use conventions to automatically set named query filters cannot override those filters with explicit configuration in their
OnModelCreatingmethod.There is no workaround other than not using named query filters or removing the convention entirely.
How found
Customer reported on 10.0.3
Regression
No, named query filters is a new feature in EF 10
Testing
Test added.
Risk
Low. The change is minimal.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.