You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typed filters: char comparisons render an integer, and HasValue and other scalar members fail at migrations add, not at the declaration #80
area/expression-indexesExpression, typed LINQ and JSON member indexesarea/indexesComplex-property, composite, unique and filtered indexesbugSomething isn't workingpackage/postgresqlAffects EFCore.ComplexIndexes.PostgreSQLseverity/lowCosmetic, message or documentation-level difference
Typed-filter constructs that fail later than the declaration, although the docs promise the subset "fails at the declaration":
char comparisons. C# lifts x.Grade == 'A' to Convert(x.Grade, int) == 65; the translator strips the Convert and renders "Grade" = 65, which PostgreSQL rejects at apply (operator does not exist: character = integer). EF renders 'A'.
HasValue.x => !x.RevokedAt.HasValue is accepted at the declaration as the path {RevokedAt.HasValue}, then migrations add throws Could not resolve property path 'RevokedAt.HasValue'. HasValue is a common spelling of the null check.
Any other member of a scalar type (scope added 2026-10-20, from the parity sweep Tests: sweep typed filters and typed expression indexes against EF Core's ToQueryString #101): x.RevokedAt.Value, x.CreatedAt.Year and the like are accepted at the declaration as paths ({CreatedAt.Year}) and fail at migrations add the same way, in filters and in typed expression indexes alike. char comparisons fail the same way inside a coalesce ((x.Grade ?? 'A') == 'A') and against a ToJson() member.
Fix
Render a char literal when a converted char operand meets an int constant; translate HasValue to IS NOT NULL (and .Value to the column), and refuse every other member of a scalar type at the declaration.
Loud. Found by the 5.5.0 pre-tag analysis (PostgreSQL satellite).
changed the title [-]Typed filters: char comparisons render an integer and HasValue fails at migrations add, not at the declaration[/-][+]Typed filters: char comparisons render an integer, and HasValue and other scalar members fail at migrations add, not at the declaration[/+]on Oct 20, 2026
area/expression-indexesExpression, typed LINQ and JSON member indexesarea/indexesComplex-property, composite, unique and filtered indexesbugSomething isn't workingpackage/postgresqlAffects EFCore.ComplexIndexes.PostgreSQLseverity/lowCosmetic, message or documentation-level difference
Activity
[-]Typed filters: char comparisons render an integer and HasValue fails at migrations add, not at the declaration[/-][+]Typed filters: char comparisons render an integer, and HasValue and other scalar members fail at migrations add, not at the declaration[/+]