File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Unidirection Association Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Unidirection Association " Watch "Unidirection Association " New topic

Unidirection Association

Bhavik Patel
Ranch Hand

Joined: Jul 12, 2004
Posts: 155
I am new to hibernate and wanted to know how do i represent one to many association in mapping file if i just want it to be unidirectional.

if i represent < one-to-many > element in one class and <many-one> in other class then does it mean it's representing Bi directional Association ??

SCJP 1.4<br />SCWCD 1.4(91%)<br />Working on SCJD -Bodgitt & Scrapper Constructions...<br /> <br />"It takes 43 muscles to frown & 17 to smile but it doen't take any to just sit there with a dumb look on your face .. Keep Smiling "
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626


In your class wheen you define one-many there you mentioned inverse=true.
It makes bidirectional relationship.
I agree. Here's the link:
subject: Unidirection Association
It's not a secret anymore!