question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please add association class support to classDiagram syntax

See original GitHub issue

Is your feature request related to a problem? Please describe. Unable to represent UML association classes in Mermaid class diagrams.

Describe the solution you’d like An extension to the current class diagram syntax that will render association classes.

Describe alternatives you’ve considered Using a tool other than Mermaid for class diagrams that does support association classes.

Additional context What would be needed is a way to indicate a relationship between three classes, the two classes being associated and the association class that embodies the relationship. This might be done in a number of ways. One might be to support adding a class in the middle of a normal relationship, e.g. X "mult" -- A -- "mult" Y: label to denote an association class A embodying the relationship between classes X and Y.

However it is represented in the classDiagram syntax, this should render as a standard UML association class, i.e. a normal relationship line between X and Y with a dashed line connecting A to the relationship line.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:10

github_iconTop GitHub Comments

7reactions
simkimsiacommented, Aug 14, 2020

Since most of the notation for class Diagram in mermaid matches those of PlantUML, I recommend following the same notation for association class in PlantUML for mermaid

Link is here http://plantuml.com/guide

image

in other words, like this

X "0..*" - "1..*" Y
(X, Y) .. A
0reactions
thomasbtfcommented, Nov 17, 2022

Would appreciate this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Association classes in UML diagrams - IBM
In UML diagrams, an association class is a class that is part of an association relationship between two other classes. You can attach...
Read more >
How to Draw a UML Association Class
We have two classes Student and Course which are linked on the diagram. · Next, we create a class. · Name the newly...
Read more >
Class Diagram syntax and features - PlantUML
PlantUML class diagram syntax: You can define interfaces, members, ... You can add an extra arrow pointing at one object showing which object...
Read more >
Association Class | Enterprise Architect User Guide
This diagram illustrates an Association Class between model elements. Note the dotted line from the Class to the Association. You cannot move or...
Read more >
Class Diagram Relationships in UML Explained with Examples
is the active logical association when the cardinality of a class in relation to another is being depicted. For example, one fleet may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found