Summary
Support a property path through a collection on the right side of a filter comparison.
Examples, with a Recipe that has a Title and a collection of Ingredients:
Title == Ingredients.Name: recipes where an ingredient has a name equal to the title.
Title @=* Ingredients.Name: recipes where the title contains the name of an ingredient (case-insensitive).
The expected expressions:
x => x.Ingredients.Any(i => i.Name == x.Title)
x => x.Ingredients.Any(i => x.Title.ToLower().Contains(i.Name.ToLower()))
Current behavior
Design questions
- Does a collection path on the right side mean "any" or "all"? A collection path on the left side uses "any" today.
- What happens when both sides are collection paths, for example
Ingredients.Name == Tags.Name?
- How do
PreventFilter, query names, and MaxPropertyDepth apply to a right-side collection path?
- Which operators are valid? The string operators (
@=, _=, _-=, and their case-insensitive and negated forms) and the comparison operators are the main set.
Relation to #129
If this feature ships, #129 can close in favor of it. The feature changes the current exception to a correct result.
Summary
Support a property path through a collection on the right side of a filter comparison.
Examples, with a
Recipethat has aTitleand a collection ofIngredients:Title == Ingredients.Name: recipes where an ingredient has a name equal to the title.Title @=* Ingredients.Name: recipes where the title contains the name of an ingredient (case-insensitive).The expected expressions:
Current behavior
Title == Ingredients.NamethrowsParsingException, andTitle @=* Ingredients.NamethrowsArgumentException. Only fix(filter)!: accept a property path on the right side of a comparison #150 readsIngredients.Nameas the literal text"Ingredients.Name".Title == Tagsalso throwsParsingExceptiontoday. fix(filter): use the resolved property for right-side paths and sorts #129 did not change the==result, because v1.14.2 already throws.Design questions
Ingredients.Name == Tags.Name?PreventFilter, query names, andMaxPropertyDepthapply to a right-side collection path?@=,_=,_-=, and their case-insensitive and negated forms) and the comparison operators are the main set.Relation to #129
If this feature ships, #129 can close in favor of it. The feature changes the current exception to a correct result.