|
|
|
Entity Framework 4.0 Code Only
|
|||
|---|---|---|---|
|
#18+
Знает ли кто-нибудь, как с помошью EF реализовать наследование вида abstract class A, class B : A, class C : A, и замапить его на одну таблицу в БД, т.е реализовать table per hierarhy? Я делаю маппинг так : MapHierarchy() .Case<B>(p => new{ ... , descriminantColumn = 1}) .Case<C>(s => new { ... , descriminantColumn = 2 }).ToTable("tphTable"); При этом я получаю эксепшн, что The table 'tphTable' is mapped to two different object sets 'B' and 'C'. At most one object set may be mapped to a table. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.05.2010, 17:13 |
|
||
|
|

start [/forum/topic.php?fid=32&fpage=74&tid=1542701]: |
0ms |
get settings: |
7ms |
get forum list: |
11ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
54ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
30ms |
get tp. blocked users: |
2ms |
| others: | 219ms |
| total: | 340ms |

| 0 / 0 |
