使用XML进行nhibernate多级继承

时间:2017-04-21 19:35:28

标签: c# xml nhibernate multiple-inheritance

所以基本上,映射就像

  ISport(this is an interface without table)
    |
    |
  SportBase(This is a class with a table)
    |
    |------------------------------|
  SportA(with table SportA)    SportB(with table SportB)

所以Interface没有表, 然后Sportbase有一张表格地图。 SportA和SportB扩展了SportBase。

如何映射这些关系使用Nhibernate Xml。

所以,我们可以这样做 ISport sport = new SportA(); 并且var someSport =(SportA)SportBase;

加上我知道我应该使用union-subclass。

0 个答案:

没有答案
相关问题