-
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
Relational: TPH inheritance mapping pattern #247
Comments
The highest priority is to support some form of table per hierarchy a.k.a single table inheritance. |
+1 on the various mapping patterns (TPT, TPH, etc) Please don't forget a mix of the two in a single graph. |
+1 for the inheritance support, at least one strategy. |
Please do NOT support mixing strategies... |
Please do not support inheritance OOB, can this be achieved in a separate package so to make pay for play real? |
Since we do not support inheritance, what better alternative? I was thinking of creating a single class and put all the attributes in it, so work with a single table and a single class, simulating a strategy TPH |
Without at least TPH, we cannot use EF. For simple applications, the above scenarios may be fine. But for very complex scenarios especially in a world of medical applications (my company develops medical software for cancer regimens), we would not be able to handle such simple scenarios. |
Yes i uderstand |
As part of EF 7, are you going to fix all the bugs that are currently in 6? Like mapping to the same foreign key for different relationships? |
Moving into 7.0.0 since we are in the process of enabling at least some scenarios at the moment. |
For TPH, allow us to pick a custom Discriminator. There should be no reason to store a string field for each row. That is my biggest issue with TPH. |
@issafram In EF7 you can pick any property for the discriminator. |
@anpete will it support using enums for the discriminator? |
@issafram Yes. |
Any workaround even temporary? Can's live with all subclasses being generated as separated tables. Is there even a list to exclude base classes? For instance I have TeacherBase and Teacher, and in fact don't want the TeacherBase at all as a table, I only need Teacher to be generated carrying all properties include the base class'. |
@weitzhandler, did you try the Maybe you are asking for TPC (Table Per Concrete Type), but that can get confusing with foreign keys in other tables. |
I've opened a separate issue. |
@rowanmiller this item seems to represent the inheritance work as a whole and it is assigned to the 7.0.0 release. Should it have a priority and an owner or should we close it? |
Yep, changed title to reflect that we are implementing TPH for initial release (we have other issues on the backlog to track enabling other patterns). Assigning to Andriy since he has the inheritance ball at the moment (for the model building work). We should keep this open until things work well end-to-end. |
@ErikEJ because do NOT support mixing strategies ? |
how is TPC inheritance being tracked? edit: I see this is being tracked as issue 2266, and is rediculously being debated as a feature. |
@jimmymain #2266 is actually for TPT, I opened #3170 to track TPC (they were originally all tracked by this issue, but then we split it out since we are only implementing TPH for the initial stable release) |
TPH is now fully implemented |
No description provided.
The text was updated successfully, but these errors were encountered: