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

Inverted direction of the composition arrow in UML class diagrams #41

Open
jansule opened this issue Apr 26, 2023 · 3 comments
Open

Inverted direction of the composition arrow in UML class diagrams #41

jansule opened this issue Apr 26, 2023 · 3 comments

Comments

@jansule
Copy link
Contributor

jansule commented Apr 26, 2023

In the UML class diagrams, it looks as if the diamonds of the composition arrow are currently adjacent to the contained class instead of the containing class, which does not seem to follow the UML spec (see e.g. https://www.omg.org/spec/UML/2.5.1/PDF Figure 11.5).

Example: OperationExpression is the containing class, Operation the contained class, so I would expect the diamond to be adjacent to OperationExpression.

image

@cportele
Copy link
Member

Yes, they are all at the wrong end.

It is also redundant - and not proper UML - to express a single property as both an attribute and a composition role. I would just drop all the compositions.

@jerstlouis
Copy link
Member

Thanks for pointing this out.

I had seen the opposite directions used in several places (just found this one: https://images.doclify.net/gleek-web/d/454dab25-c05d-4cbd-8cfc-b1651745346d.png?w=1200&format=webp), but clearly this is how it should be in proper UML :)

@jerstlouis
Copy link
Member

This order of the arrow should be correct now. Thanks @jansule for spotting this and @maxcollombin for fixing this.

At last for now while we are working on the draft, we'll keep both the attribute and composition arrows despite this not being proper UML, since it's convenient to see the relationship class boxes yet it's also convenient to have the full list of attributes visible inside the boxes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants