Hi;
I tripped over this so I'm posting for those that may also hit this.
When you create a table per subclass using <joined-subclass>, it works this way:
<class name="BaseClass">
<id name="baseClassPrimaryKey" ...>
<property .../>
...
<joined-subclass name="DerivedClass">
<key column="baseClassPrimaryKeyColumnName"/>
<property .../>
...
</joined-subclass>
</class>
The example I first read made me think it was the other way around.
One further note - no PK in the derived class, just the base class. The derived class has a column with the same name as the the PK in the base class, but do not set it as identity, just as a PK.
- dave
|