-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Relational: Entity splitting support #620
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
Comments
I would love if this feature does not fill in the standard Relational library but perhaps is exposed as a additional feature (pay for play scenario) which I can plug in only if needed |
Related to TPT #2266 |
Note: consider optional relationships: #9773 |
API proposal: modelBuilder.Entity<Customer>().SplitToTable("CustomerDetails", tb =>
{
// PK mapped to all tables by default
// Any other property mapped to a split table is not mapped to the default table
tb.Property(c => c.AlternateKey);
// Empty column name effectively removes the property from the mapping fragment
tb.Property(c => c.AlternateKey).HasColumnName("");
});
modelBuilder.Entity<Customer>().ToTable("Customer", tb =>
{
// Properties can be explicitly mapped to the default table too
tb.Property(c => c.AlternateKey);
});
modelBuilder.Entity<Customer>().SplitToView("CustomerView", tb =>
{
tb.Property(c => c.AlternateKey);
}); |
Would be very appreciated for implementing this, we have a lot of legacy one-to-one tables in DB which make no sense to treat separately in backend |
Would very much love this feature, also the optional relationships is a must have when implementing entity splitting |
Any update? Would love to see this feature incorporated. |
@maurei This issue is in the Backlog milestone. This means that it is not going to happen for the 3.0 release. We will re-assess the backlog following the 3.0 release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources. |
I suppose what Owned Entity Types can be used as an alternative for Entity Splitting and it's already implemented at EFCore 2.0. |
Add check constraint and trigger annotation support to migration snapshot Improve owned type FK discovery Part of #620
Add check constraint and trigger annotation support to migration snapshot Improve owned type FK discovery Part of #620
Don't use identity be default for columns with FKs even when the property is mapped to other columns that should use identity Part of #620
Don't use identity by default for columns with FKs even when the property is mapped to other columns that should use identity Update value generation on properties when an entity type is no longer mapped to a table or is mapped again Part of #620
Can I somehow specify that the foreign key is already specified in a table? Right now, EF tells me that I must have the FK in the "main" table but the limitation in the issue descriptions only says that FK |
@OskarKlintrot Please open a new issue and attach a small, runnable project or post a small, runnable code listing that shows what you are attempting and what doesn't work. |
This work item represents the mapping capability to slice the data contained by an object into multiple tables.
Limitations:
Related: #17270 (comment)
The text was updated successfully, but these errors were encountered: