Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 26, 2025

This PR documents breaking changes for EF Core 10.0 related to complex types.

Breaking Changes Documented

Complex Types (#4970)

  • Column name uniquification: Complex type column names are now uniquified by appending a number if another column with the same name exists, instead of silently sharing columns between properties
  • IDiscriminatorPropertySetConvention signature change: The ProcessDiscriminatorPropertySet method now takes IConventionTypeBaseBuilder instead of IConventionEntityTypeBuilder
  • Nested complex type column naming: Properties on nested complex types now use the full path to the property as part of the column name instead of just the declaring type

Changes Made

  • Added breaking change entries to EF Core 10.0 breaking changes documentation for complex types
  • Moved value converter compiled models breaking change to EF Core 9.0 documentation (where it was actually introduced)
  • Updated compiled models limitations section with value converter constraints
  • Provided clear migration guidance and examples for all breaking changes
  • Addressed all review feedback for accuracy and clarity

Fixes #4970
Fixes #4947


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…els with value converters

Co-authored-by: AndriySvyryd <[email protected]>
@Copilot Copilot AI changed the title [WIP] Fix these issues @dotnet/EntityFramework.Docs/issues/4970 @dotnet/efcore/issues/35033 Document breaking changes for complex types and compiled models in EF Core 10.0 Sep 26, 2025
Copilot finished work on behalf of AndriySvyryd September 26, 2025 20:21
@Copilot Copilot AI requested a review from AndriySvyryd September 26, 2025 20:21
@Copilot Copilot AI requested a review from AndriySvyryd September 26, 2025 22:37
Copilot finished work on behalf of AndriySvyryd September 26, 2025 22:37
@Copilot Copilot AI requested a review from AndriySvyryd September 26, 2025 23:19
Copilot finished work on behalf of AndriySvyryd September 26, 2025 23:19
@Copilot Copilot AI requested a review from AndriySvyryd September 26, 2025 23:26
Copilot finished work on behalf of AndriySvyryd September 26, 2025 23:26
@AndriySvyryd AndriySvyryd marked this pull request as ready for review September 26, 2025 23:36
@AndriySvyryd
Copy link
Member

@copilot Update the description with a short summary and reference the fixed issues dotnet/efcore#35033 and #4970

Copy link
Contributor Author

Copilot AI commented Sep 26, 2025

@copilot Update the description with a short summary and reference the fixed issues dotnet/efcore#35033 and #4970

Updated the PR description with a short summary of the breaking changes documented and added references to the fixed issues #35033 and #4970.

@Copilot Copilot AI requested a review from AndriySvyryd September 26, 2025 23:39
Copilot finished work on behalf of AndriySvyryd September 26, 2025 23:39
@AndriySvyryd AndriySvyryd requested a review from a team September 26, 2025 23:51
{
public static readonly BooleanToCharConverter Default = new();

public BooleanToCharConverter()
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe modernize the code sample a bit, with a primary constructor, expression-bodied methods below?

Copy link
Member

Choose a reason for hiding this comment

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

@copilot modernize the code sample a bit, with a primary constructor and expression-bodied methods

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modernized the code sample to use a primary constructor and expression-bodied methods for the conversion methods. (1d1a23e)

|:--------------------------------------------------------------------------------------------------------------- | -----------|
| [SQL Server json data type used by default on Azure SQL and compatibility level 170](#sqlserver-json-data-type) | Low |
| [ExecuteUpdateAsync now accepts a regular, non-expression lambda](#ExecuteUpdateAsync-lambda) | Low |
| [Compiled models now throw exception for value converters with private methods](#compiled-model-private-methods) | Low |
Copy link
Member

Choose a reason for hiding this comment

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

@copilot please align indentation here so that the markdown table is formatted correctly/consistently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the markdown table indentation alignment. (94791e4)


#### Old behavior

Previously, when mapping complex types to table columns, if multiple properties in different complex types had the same column name, they would silently share the same column.
Copy link
Member

Choose a reason for hiding this comment

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

How does this relate to the breaking change just below - are they dups? In other words, if the full path is now used (the change below), how is it possible to for multiple properties in different complex types to have the same column name (i.e. when would appending the number be necessary)?

Copy link
Member

Choose a reason for hiding this comment

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

It's less likely, but still possible if the user explicitly set the column name on one that matches the default column name of the other.

@roji
Copy link
Member

roji commented Sep 30, 2025

@AndriySvyryd am slightly confused by certain things here (see comments) but I'm sure it's my misunderstanding etc.

@Copilot Copilot AI requested a review from roji September 30, 2025 11:28
Copilot finished work on behalf of roji September 30, 2025 11:28
@Copilot Copilot AI changed the title Document breaking changes for complex types and compiled models in EF Core 10.0 Document breaking changes for complex types in EF Core 10.0 Sep 30, 2025
Copilot finished work on behalf of AndriySvyryd September 30, 2025 16:56
@AndriySvyryd AndriySvyryd merged commit 0ae6eac into live Sep 30, 2025
6 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/fix-a278b454-18f8-429a-a431-75b87ce795c2 branch September 30, 2025 17: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.

Document breaking changes related to complex types Document owned complex property breaking change
3 participants