Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use class member arrows to start relationship between a class field of a type and its type UML class #107

Open
lucsorel opened this issue Jul 22, 2024 · 0 comments

Comments

@lucsorel
Copy link
Owner

#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):

@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:

  1. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant