-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Introduce IStructuralProperty #36485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the IStructuralProperty
interface to unify complex properties and navigation properties under a common abstraction. The purpose is to simplify handling of properties that reference types (both complex types and entity types) throughout the EF Core codebase.
- Introduces new interface hierarchy for structural properties
- Consolidates handling of navigation and complex properties
- Adds validation to prevent shadow properties on complex types
Reviewed Changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
IStructuralProperty.cs | Introduces new interface for properties that reference types |
IReadOnlyStructuralProperty.cs | Read-only version of structural property interface |
IMutableStructuralProperty.cs | Mutable version for model building |
IConventionStructuralProperty.cs | Convention-based version for model building |
CollectionResultExpression.cs | Updates to use IStructuralProperty instead of IPropertyBase |
ModelValidator.cs | Adds validation to prevent shadow properties on complex types |
Various test files | Adds tests for new functionality and skips failing tests |
Files not reviewed (1)
- src/EFCore/Properties/CoreStrings.Designer.cs: Language not supported
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
f912b4f
to
3c55c01
Compare
7ac6b9e
to
352443c
Compare
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
352443c
to
d16aa4d
Compare
Add support for property bag complex types
Throw for shadow properties on complex types
Fixes #31237
cc @artl93