<class name="${user.pkg}.Address" identity="oid"> <!-- oid is defined but not used when inlined --> <field name="oid" type="integer"> <sql name="ad_oid" /> </field> <field name="street" type="string" len="64"> <sql name="ad_street" /> </field> <field name="city" type="string" len="20"> <sql name="ad_city" /> </field> <field name="state" type="string" len="2"> <sql name="ad_state" /> </field> </class>To include some address in class user the syntax would be.
<class name="${user.pkg}.User" identity="oid" end-date="true"> ... <field name="homeAddress" type="${user.pkg}.Address" > <sql name="ad" inline="true" prefix="home" /> </field> <field name="workAddress" type="${user.pkg}.Address" > <sql name="ad" inline="true" prefix="work" /> </field> ...