-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add public APIs to configure shared type entities #21552
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.
A few updates requested.
Also I don't see the changes for UsingEntity() and the generic "this is not the API you are looking for" exception. When you say this "resolves" 9914, is there still more work to come?
yes, therefore it is WIP. I wanted to get early eyes from @AndriySvyryd on this before I start adding overloads, but I just added overloads for OwnsOne/Many, HasOne/Many. UsingEntity is still pending. Still writing few more tests for presently added overloads. |
src/EFCore/Metadata/Conventions/DerivedTypeDiscoveryConvention.cs
Outdated
Show resolved
Hide resolved
Looking good so far |
@smitpatel As a general question, if a user calls the STET version of an API with a name and type of an existing non-STET Entity Type will you attempt to use that Entity Type, or error? If you use it will that put that Entity Type's CLR type into the list of shared CLR types? |
Error. |
We should discuss whether to follow the same pattern as with weak types: The first time Entity(type, name) is called it defines a normal entity type, but when it's called with the same type again that's when it becomes a STET. |
See team decision in #9914 (comment) |
This is just rebase & squash on latest. Will move out of draft once I update the PR for design meeting decision and ready for review. |
Updated. |
Resolves #9914