Self-Association in UML Diagrams

A UML self-association is an association of a class with itself.

A self-association (also called reflexive association) is a type of association that creates a relationship of a class with itself. The association forms a loop in the diagram. It is used to represent hierarchical structures of the same types.

How to Create a Self-Association

There are two options how you can add a self-association to a class:

  • Drag the association from the toolbox and drop it over the chosen class. The self-association for this class will be added.
  • Select the Association tool in the toolbox and draw a connector that will start and also end over the class.
Self Association Creation
Self Association Creation

Self-Association Example

The following example shows a self-association in the Folder class. It has two roles: parentFolder and nestedFolders with different multiplicities. A folder can have only one or no parent folders of the Folder type. A folder can be associated with multiple nested folders of the Folder type.

Self Association in UML Class Diagram
Self Association in UML Class Diagram

New Comment

Comment