Type Hierarchy: Inheritance, Containment & Aggregation

Intermediate

Type Hierarchy: Inheritance, Containment & Aggregation

Every Relationship Type can carry semantic flags that change how its connections behave — beyond just drawing a line. Select a Relationship Type in the Model Navigator, open the Properties panel, and find the Type Hierarchy section. The flags are independent — turn on only the ones you need.

Inheritance flags

Use these when a relationship means "is a kind of" (e.g. an is_a link from Electric Car to Car). The child type then picks up things from its parent:

  • Inherit properties — the child gains the parent's properties. They show on the child (greyed/italic) and on every instance of it; edit them on the parent.
  • Inherit allowed connections — the child can connect anywhere the parent can.
  • Inherit views — the child uses the parent's visual style unless overridden.

As you model (in the app and via the API), a type may have one parent, and cycles are rejected.

Containment (nesting)

Turn on Containment (nesting) when a relationship means "is part of / is inside" (e.g. an Engine inside a Car). Connections of that type render as nesting instead of a line:

  • On the canvas, the contained element sits inside its container as a box-in-box. The container grows to fit its contents, and dragging the container moves everything inside it. The connecting line is hidden — the nesting is the relationship.
  • In the Model Navigator tree, the contained element appears beneath its container.

Direction matters: draw the connection from the contained element to its container (source = the part, target = the whole).

Aggregation

Aggregation marks a weaker "part of" relationship (shared parts, independent lifecycle) for documentation. It has no visual effect on its own — the connection stays an ordinary line. For a UML-style hollow diamond, set a Diamond arrow end in the relationship type's styling (see Styling Relationship Types).

Good to know

  • All flags default off, so existing models are unchanged.
  • The flags are independent: a relationship can nest without inheriting, or inherit without nesting.