Yes it is possible. Please read the following example mapping.
Code:
<class name="poc.user.model.User"
table="USER" lazy="false" discriminator-value="USER">
<id name="userID" type="string" length="20"/>
<discriminator column="subclass" type="string"/>
<property name="birthday" type="date"/>
<property name="firstname" type="string" length="20" not-null="true"/>
<property name="lastname" type="string" length="20" not-null="true"/>
<property name="middlename" type="string" length="20"/>
<property name="image" type="binary" length="2048000"/>
<component
name="homeAddress"
class="poc.user.model.Address">
<property name="street" column="homeStreet" type="string" length="100" not-null="true"/>
<property name="city" column="homeCity" type="string" length="30" not-null="true"/>
<property name="state" column="homeState" type="string" length="30"/>
<property name="zip" column="homeZip" type="string" length="10"/>
<property name="country" column="homeCountry" type="string" length="2" not-null="true"/>
</component>
<list
name="roles"
table="userRoles"
lazy="false">
<key column="userID" not-null="true"/>
<list-index column="roleIndex"/>
<composite-element class="poc.user.model.Role">
<property name="name" length="10"/>
<property name="description"/>
</composite-element>
</list>
<subclass name="poc.user.model.Admin"
discriminator-value="Admin">
<property name="equipment" type="string"/>
<subclass name="poc.user.model.Manager"
discriminator-value="Manager">
<property name="car" type="string"/>
</subclass>
</subclass>
</class>
In this mapping I defined subclass hierarchy User->Admin->Manager
The only thing you should notice is that it only creates one table "User". It will contain all the columns from User, Admin, and Manager objects.
Kind regards,
Roy