nhibernate - table per type inheritance error
Posted: Wed 27 Aug 2014 07:18
Hello,
I am trying to import hbm.xml file into the Devart Nhibernate Model (via visual studio).
The file contains the following definitions:
<class name="Party"
abstract="true"
table="Parties">
<id name="Id">
<generator class="identity"/>
</id>
<joined-subclass
table="People"
name="Person">
<key column="PartyId"/>
<property name="FirstName"/>
</joined-subclass>
<joined-subclass
table="Companies"
name="Company">
<key column="PartyId"/>
<property name="CompanyName"/>
</joined-subclass>
</class>
When the process ends, i get the following error:
Abstract class 'Party' cannot participate in a Table Per Type inheritance.
What is the problem with my file? It is a valid Nhibernate definition..
I am trying to import hbm.xml file into the Devart Nhibernate Model (via visual studio).
The file contains the following definitions:
<class name="Party"
abstract="true"
table="Parties">
<id name="Id">
<generator class="identity"/>
</id>
<joined-subclass
table="People"
name="Person">
<key column="PartyId"/>
<property name="FirstName"/>
</joined-subclass>
<joined-subclass
table="Companies"
name="Company">
<key column="PartyId"/>
<property name="CompanyName"/>
</joined-subclass>
</class>
When the process ends, i get the following error:
Abstract class 'Party' cannot participate in a Table Per Type inheritance.
What is the problem with my file? It is a valid Nhibernate definition..