Code:
<class name="Association" table="ASSOCIATION">
<id name="id" column="ASSOCIATION" type="integer">
<generator class="native"/>
</id>
<property name="parentProfileId" column="PARENT_PROFILE_ID" type="integer" not-null="true" />
<property name="childProfileId" column="CHILD_PROFILE_ID" type="integer" not-null="true" />
<many-to-one name="parentProfile"
class="Profile"
column="parent_profile_id"/>
</class>
should be
Code:
<class name="Association" table="ASSOCIATION">
<id name="id" column="ASSOCIATION" type="integer">
<generator class="native"/>
</id>
<property name="childProfileId" column="CHILD_PROFILE_ID" type="integer" not-null="true" />
<many-to-one name="parentProfile"
class="Profile"
column="parent_profile_id"/>
</class>
parent should be transparent as managed by the many to one association