EF Code First: Retrieving a base type queries all derived type tables

后端 未结 1 1336
清酒与你
清酒与你 2021-01-22 11:15

I\'m having an odd issue with EF 4.1 Code First where even though I have configured an entity to generate columns for its inherited properties, it still joins to the inherited t

1条回答
  •  鱼传尺愫
    2021-01-22 11:36

    That is how EF behaves. If you query Human set it always goes over all derived tables as well because SuperHuman is still Human and because of that instances of SuperHuman are valid results of query for humans.

    0 讨论(0)
提交回复
热议问题