-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Bidirectional association equal to two unidirectional assoc.
PostPosted: Mon Mar 14, 2005 5:33 pm 
Newbie

Joined: Mon Mar 14, 2005 5:15 pm
Posts: 2
This is a bidirectional association:

A <---> B

Is this equal to modelling it as two unidirectional relations?
Code:
  --->
A      B
  <---

One of our external coworkers states that they are NOT equal. He says that they have different consequences. I don't think so. Whats right, whats wrong? Please tell me.

Its hard to draw a class diagramm in plain ASCII, but I hope you see what I mean.

You have a.getB and b.getA.

We even use a persistance layer where you can specify just at one end with "@bidirectional" that the association is bidirectional.

But you can also specify "@unidirectional com.path..." at both ends of the association! The guy who made the code generator for this homegrown persistance layer told me that it results in different consequences. I think he means that the object diagrams would be different.

Who is wrong? What is correct?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 15, 2005 2:35 am 
Newbie

Joined: Mon Mar 14, 2005 5:15 pm
Posts: 2
Whats the answer?

I know that it is not really a Hibernate question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.