Are Unidirectional associations considered a bad practice? are they thinked only for parent - child relations where the child cannot live with the parent (this last question is because the example in the help reference uses "Person" and "Adress" clases, where the Address can't live without the Person).
I have a class called "Desriptions" that handles all simple "id - description" tables ("type of currencies", "types of documents", "types of customers", etc), so this class is pretty much in any other class, but an "description" object does not depend on another object to exist. If I map this class as a bidirectional association, then the class needs to have a "Set" variable for each of the other classes, and furthermore, for those classes that have more than one instance of this class, there are multiple Set variables. This variables are actually useless, since when I need an instance of "Descriptions", I certainly do not need any those variables... so I'm guessing a unidirectional association here, but I don't know for sure, and so far the bidirectional way is working (hopefully, working fine).
I'd appreciate any insigths to this matter, thanks!
Alejandro.
|