Conversation
pdevito3
force-pushed
the
fm/qk-breaking-alias-dot
branch
from
October 1, 2026 21:02
f527c60 to
5ffcfc9
Compare
The public method ReplaceAliasesWithPropertyPaths does not replace a query name after a dot anymore. A query name after a dot is a segment of a nested path of another type. For example, with the query name "name" on Title, "Author.Name" stays "Author.Name". The filter parser calls an internal overload that keeps the v1.14.2 match. Filters do not change. #154 owns the filter change for a query name after a dot. BREAKING CHANGE: ReplaceAliasesWithPropertyPaths keeps a query name after a dot. It also does not throw InvalidOperationException for a fully prevented query name after a dot.
pdevito3
force-pushed
the
fm/qk-breaking-alias-dot
branch
from
October 1, 2026 21:45
5ffcfc9 to
f8cb2ab
Compare
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.
For later consideration in a major version. Do not merge now. #122 restored the v1.14.2 match to keep v1.x non-breaking. This PR takes the fix back.
Summary
QueryKitPropertyMappings.ReplaceAliasesWithPropertyPathsreplaces a query name anywhere in front of an operator, also after a dot.nameis the query name of a top-level property, the old match changesAuthor.NametoAuthor.Title, which is a wrong path.InvalidOperationExceptionfor a query name after a dot when the property hasPreventFilter()andPreventSort().ReplaceAliasesWithPropertyPaths(input, replaceAfterDot: true), that keeps the v1.14.2 match. As a result, filters do not change.QN1 (a query name after a dot in a filter)
#154 owns QN1, the filter change for
Author.name == "Ann". QN1 can not move to this PR. On main, the parser calls this method on the filter text. With the new match in the parser,Author.Name == "Ann"givesx => (x.Author.Name == "Ann")and notUnknownFilterPropertyException. This is QN1. #154 gets the same result, because it removes this call (J5). For this reason, this PR changes only the result of the public method.Evidence
With
config.Property<Recipe>(x => x.Title).HasQueryName("name")(the match ignores case):The restore test is renamed back to
alias_replacement_does_not_replace_a_query_name_in_a_nested_pathand expects the new result.The new pin
filter_with_a_query_name_in_a_nested_path_still_throws_for_the_replaced_pathshows that filters do not change.Author.Name == "x"still throwsUnknownFilterPropertyExceptionfor'Title', like v1.14.2 and main.dotnet teston this branch: 471 unit tests and 297 Postgres integration tests (Testcontainers) pass, 0 failures.Interaction with other PRs
#154 deletes the call in
FilterParser.ParseFilterthat this PR changes. This gives a one-line text conflict. If both merge, keep the deletion of #154. Then delete the pinfilter_with_a_query_name_in_a_nested_path_still_throws_for_the_replaced_path, because #154 changes that result.Merge Danger
Door: two-way
The change is one lookbehind in one regex, and one internal overload for the parser.
Blast Radius: direct callers
The parser calls an internal overload that keeps the v1.14.2 match, so filters do not change. Only consumer code that calls
ReplaceAliasesWithPropertyPathsdirectly sees the new result.