Document provider-facing breaking change: no-op SQL CAST stripping#5351
Merged
Document provider-facing breaking change: no-op SQL CAST stripping#5351
Conversation
a16d33a to
20408d1
Compare
Add a note to the EF Core 11 provider-facing changes page documenting that EF Core now strips SqlUnaryExpression(Convert) nodes when the store type matches the operand's store type. This can expose imprecise translations that relied on wrapping an imprecise store type in a Convert. Refs dotnet/efcore#36247, dotnet/efcore#38156 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
20408d1 to
dabcf9a
Compare
There was a problem hiding this comment.
Pull request overview
Adds a provider-facing note to EF Core 11 documentation to highlight a breaking change where no-op SQL CASTs (convert unary expressions with matching store types) are stripped, which may expose imprecise type mappings in provider translations.
Changes:
- Documented no-op SQL CAST stripping behavior in EF Core 11 query translation.
- Added guidance for provider authors to ensure
Convertoperands have precise store types to avoid unintended type propagation.
AndriySvyryd
approved these changes
May 8, 2026
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.
EF Core 11 now strips
SqlUnaryExpression(Convert)nodes when the store type matches the operand's store type (dotnet/efcore#38156). This is a provider-facing breaking change because it can flush out imprecise translations that assigned a broad store type to a node and relied on a wrapping Convert to paper over it -- the Convert now gets stripped, leaving the imprecise type exposed.This adds a note to the EF Core 11 provider-facing changes page so provider authors are aware they should review their translations and ensure Convert operands carry the correct, precise store type.