所以基本上,映射就像
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。