File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
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
Use of set tag in Hibernate mapping file?
persisting a collection - one-to-many mapping
Hibernate, User and Address with association table between
joins in Hibernate Annotation
Not-null property references a null or transient value
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015