in terms of implementing the inheritance in code, i'm assuming you understand all of that. when it comes to the mapping files you have two choices; placing the subclass mappings in the main abstract class mapping file, or separating the subclass mappings into separate files that "extend" the abstract class mapping file.
at a higher-level, though, there are at three basic strategies; table-per-hierarchy, and table-per-subclass, table-per-concrete-class. i personally prefer table-per-subclass because it approaches database normilization standards in a cleaner method. assuming table-per-subclass:
Code:
<hibernate-mapping
xmlns="urn:nhibernate-mapping-2.0"
assembly="My.Core"
namespace="My.Core.Domain">
<class
name="AbstractEntity"
table="AbstractEntity">
<id
name="id"
column="EntityID"
type="Int32"
unsaved-value="-1"
access="field">
<generator class="identity" />
</id>
<version name="version" column="Version" type="Int32" unsaved-value="-1" access="field" />
<property
name="MyProperty"
column="MyProperty"
type="Boolean"
not-null="true" />
</class>
</hibernate-mapping>
Code:
<hibernate-mapping
xmlns="urn:nhibernate-mapping-2.0"
assembly="My.Core"
namespace="My.Core.Domain">
<joined-subclass
name="ConcreteEntity"
extends="My.Core.Domain.AbstractEntity, My.Core"
table="ConcreteEntity">
<key column="EntityID" />
<property
name="NewProperty"
column="NewProperty"
type="Boolean"
not-null="true" />
</joined-subclass>
</hibernate-mapping>
this relies on the the two tables sharing the PK->PK,FK relationship.
look here for more detailed information:
http://www.hibernate.org/hib_docs/nhibe ... nheritance
-devon