Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Sep 22, 2025

Fixes #36837

Description
Database types weren't being correctly inferred in queries comparing complex types - see #36837 for a full description.

Customer impact
When performing queries that compare complex types, the user may get incorrect results (data corruption):

var foo = new Foo { ... }; _ = context.Blogs.Where(b => b.Foo == foo).ToListAsync();

(when the type Foo contains a property that's mapped to a non-default type in the database, e.g. DateTime to SQL Server datetime).

This also blocks some mainline scenarios in 10.0 for PostgreSQL.

How found
While updating the PostgreSQL provider to use the latest EF bits.

Regression
No

Testing
Test added

Risk
Very low, targeted 2-line fix.

@roji roji requested a review from a team as a code owner September 22, 2025 18:24
@roji roji added the ask-mode label Sep 22, 2025
@roji roji requested a review from jeffschwMSFT September 22, 2025 18:24
@SamMonoRT
Copy link
Member

@roji - the cutoff for RC2 is in a few hours - why not merge to RC2?

@SamMonoRT SamMonoRT requested a review from artl93 September 22, 2025 19:48
@SamMonoRT SamMonoRT changed the title [GA] Apply inferred type mappings in complex type recursive equality [RC2 ] Apply inferred type mappings in complex type recursive equality Sep 22, 2025
@roji
Copy link
Member Author

roji commented Sep 22, 2025

Ah sorry, I somehow thought that we had already branched. If this gets approved by @artl93 / @jeffschwMSFT soon I'll merge right away.

Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RC2 - don't corrupt data; newer area

@roji roji enabled auto-merge (squash) September 22, 2025 20:56
@roji roji merged commit 19b157b into dotnet:release/10.0 Sep 22, 2025
7 checks passed
@roji roji deleted the StructuralEqualityTypeInference branch September 22, 2025 21:11
roji added a commit to roji/efcore that referenced this pull request Nov 16, 2025
roji added a commit that referenced this pull request Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants