Added by on 2014-01-05

A one-to-one association is similar to many-to-one association with a difference that the column will be set as unique. For example an address object can be associated with a single employee object….

Let us develop our mapping files which instructs Hibernate how to map the defined classes to the database tables. The element will be used to define the rule to establish a one-to-one relationship between EMPLOYEE and ADDRESS entities but column attribute will be set to unique constraint and rest of the mapping file will remain as it was in case of many-to-one association.

Category:

Hibernate

Tags:

,

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*