I am just about to dip my toe into trying out Magritte to implement a
UML model and would like to clarify how bidirection relationships work.
Section 2.6.1 of [1] says... "A relationship is always defined from the
described object to the referenced object.
To describe a two-way relationship the developer has to define a
relationship description at both ends of the association."
I haven't seen a specific Magritte example of that, but I assume it is
similar to the Phosyden example [2]
personEntity hasOne: #Pet as: #myPet.
petEntity hasOne: #Person as: #owner.
That makes sense where there is only a single relation between two
classes. However where there are two relations between two classes as
shown in attached image, how are relations (1a,1b) paired together and
(2a,2b) pair together. Or would this pairing generally be of no
consequence?
I would naively assume these four definitions...
1a. topologicalNodeEntity hasOne: #TopologicalIsland as: #topologicalIsland.
1b. topologicalIslandEntity hasMany: #TopologicalNode as: #topologicalNodes.
2a. topologicalNodeEntity hasOne: #TopologicalIsland as:
#angleRefTopologicalIsland.
2b. topologicalIslandEntity hasOne: #TopologicalNode as:
#angleRefTopologicalNode.
cheers, Ben
[1]
http://www.iam.unibe.ch/~scg/Archive/Diploma/Reng06a.pdf
[2]
http://dbxtalk.smallworks.com.ar/pier/Documentation/mission-4_-about-relati…