Skip to content

Commit 00fb847

Browse files
author
Bart Koelman
committed
Clarification comments in source
1 parent c4258b2 commit 00fb847

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/JsonApiDotNetCore/Internal/Queries/Parsing/FilterParser.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ protected ComparisonExpression ParseComparison(string operatorName)
127127
EatText(operatorName);
128128
EatSingleCharacterToken(TokenKind.OpenParen);
129129

130+
// Allow equality comparison of a HasOne relationship with null.
130131
var leftChainRequirements = comparisonOperator == ComparisonOperator.Equals
131132
? FieldChainRequirements.EndsInAttribute | FieldChainRequirements.EndsInToOne
132133
: FieldChainRequirements.EndsInAttribute;

src/JsonApiDotNetCore/Internal/Queries/Parsing/QueryStringParameterScopeParser.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ protected override IReadOnlyCollection<ResourceFieldAttribute> OnResolveFieldCha
5959
{
6060
if (chainRequirements == FieldChainRequirements.EndsInToMany)
6161
{
62+
// The mismatch here (ends-in-to-many being interpreted as entire-chain-must-be-to-many) is intentional.
6263
return ChainResolver.ResolveToManyChain(_resourceContextInScope, path, _validateSingleFieldCallback);
6364
}
6465

0 commit comments

Comments
 (0)