A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Object Relational Mapping
hibernate one- to one unidirectional mapping
Joined: Sep 09, 2005
Aug 29, 2006 02:09:00
I have noticed, to represent a
unidirectional one to one
<many-to-one> mapping with unique constraint true is generally being used .
<class name="Person"> <id name="id" column="personId"> <generator class="native"/> </id> <many-to-one name="address" column="addressId" unique="true" not-null="true"/> </class> <class name="Address"> <id name="id" column="addressId"> <generator class="native"/> </id> </class>
Can any body tell me why can't we use the <one-to-one> mapping ? if we can use the aforesaid , could you tell me how can use that ?
Thanks & Regards
I agree. Here's the link:
subject: hibernate one- to one unidirectional mapping
Not-null property references a null or transient value
persisting a collection - one-to-many mapping
joins in Hibernate Annotation
Use of set tag in Hibernate mapping file?
Hibernate, User and Address with association table between
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014