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?