Conversation
The public ReplaceAliasesWithPropertyPaths changed Author.name to Author.Title when name is the query name of a top-level property. The segment after the dot belongs to another type, so the replacement made a wrong path. A query name after a dot now stays as it is. The filter parser does not call this method, so filters do not change. BREAKING CHANGE: QueryKitPropertyMappings.ReplaceAliasesWithPropertyPaths no longer replaces a query name that comes after a dot. Code that calls this method directly and needs the v1.14.2 result must replace the nested segment itself.
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.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.dotnet teston this branch: all unit and integration tests pass, 0 failures.Merge Danger
Door: two-way
The change is one lookbehind in one regex.
Blast Radius: direct callers
The parser does not call this method, so filters do not change. Only consumer code that calls
ReplaceAliasesWithPropertyPathsdirectly sees the new result.