Skip to content

fix(filter): resolve a child collection member in any case - #179

Merged
pdevito3 merged 1 commit into
mainfrom
backport/139
Oct 9, 2026
Merged

pdevito3 merged 1 commit into
mainfrom
backport/139

Conversation

@pdevito3

@pdevito3 pdevito3 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

The first member after a collection had to match in the exact case, and a member that did not match threw NullReferenceException. Every other segment of a property path ignores the case. Resolve the members after a collection like every other segment.

Behavior change: an unknown member after a collection follows AllowUnknownProperties. Without it, the filter throws UnknownFilterPropertyException, not NullReferenceException.

Examples:
ingredients.name == "flour"
before: NullReferenceException
after: x => x.Ingredients.Select(y => y.Name).Any(z => (z == "flour"))
Ingredients.Nope == "x"
before: NullReferenceException
after: UnknownFilterPropertyException

From #139 on v2.

The first member after a collection had to match in the exact case, and a member that did not match threw NullReferenceException. Every other segment of a property path ignores the case. Resolve the members after a collection like every other segment.

Behavior change: an unknown member after a collection follows AllowUnknownProperties. Without it, the filter throws UnknownFilterPropertyException, not NullReferenceException.

Examples:
  ingredients.name == "flour"
    before: NullReferenceException
    after:  x => x.Ingredients.Select(y => y.Name).Any(z => (z == "flour"))
  Ingredients.Nope == "x"
    before: NullReferenceException
    after:  UnknownFilterPropertyException

From #139 on v2.
@pdevito3
pdevito3 merged commit 05d2f54 into main Oct 9, 2026
2 checks passed
@pdevito3
pdevito3 deleted the backport/139 branch October 9, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant