Right now, PlantUML would describe the composition relationship between a person and its address like this (an arrow between the 2 classes):
@startuml
class Address {
street: str
zipcode: str
city: str
}
class Person {
name: str
address: Address
}
Person -> Address
@enduml
But it would be interesting to have the relationship starting from the Person.address field:
@startuml
class Address {
street: str
zipcode: str
city: str
}
class Person {
name: str
address: Address
}
Person::address -> Address
@enduml
Although the rendering is not so relevant on this example.
Caution:
what behavior do we want when several fields of a class link to the same class? One specific line per field? One general line between the 2 classes? Readability matters.
#3636 Arrows from/to class fields
Right now, PlantUML would describe the composition relationship between a person and its address like this (an arrow between the 2 classes):
But it would be interesting to have the relationship starting from the
Person.address
field:Although the rendering is not so relevant on this example.
Caution: