|
I have two tables joined using joined-subclass: Record and Item.
Record has a Record Name, and Item adds Title and Due Date.
A simplified version of the mapping:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Test.Record" table="Record" lazy="false">
<id name="RecordId" column="RecordId">
<generator class="assigned" />
</id>
<property name="RecordName"/>
<joined-subclass name="Test.Item" table="Item" lazy="false">
<key column="ItemId"/>
<property name="ItemTitle"/>
<property name="DueDate" />
</joined-subclass>
</class>
</hibernate-mapping>
The version column is found on Item.Version, type Sql Server timestamp. However, if I try to add a <version> element to the joined-subclass, the configuration loader throws.
Message: The element 'joined-subclass' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'version' in namespace 'urn:nhibernate-mapping-2.2'.
This is an existing database; schema changes are a barrier.
Is there a way to use joined-subclass where the version column is stored on the child table?
|