Hi,
Thanks for reply ;-)
I made a class Demo, but can't map it on hbm file.
There is my hbm Person and Credential files:
Code:
<hibernate-mapping>
<class dynamic-insert="false" dynamic-update="false" mutable="true" name="model.Person" optimistic-lock="version" polymorphism="implicit" select-before-update="false">
<id name="id">
<generator class="identity" />
</id>
<property name="name" />
<one-to-one name="credential" class="model.Credential" cascade="save-update"/>
</class>
</hibernate-mapping>
Code:
<hibernate-mapping>
<class dynamic-insert="false" dynamic-update="false" mutable="true" name="model.Credential" optimistic-lock="version" polymorphism="implicit" select-before-update="false">
<id name="id">
<generator class="foreign">
<param name="property">person</param>
</generator>
</id>
<one-to-one name="person" class="model.Person" constrained="true"/>
<property name="pass" />
</class>
</hibernate-mapping>
Please give me an idea how to map class Demo.