goplantuml icon indicating copy to clipboard operation
goplantuml copied to clipboard

Composition diamond at wrong association end

Open fractalqb opened this issue 4 years ago • 0 comments

In your example MyStruct1 is a part of MyStruct2. In particular the lifetime of MyStruct1 instances that are associated that way to MyStruct2 instances depends on the lifetime of the MyStruct2 instance. This make the association a composition where MyStruct2 is the composite and MyStruct1 is the component. For a composition the filled diamond is at the association end that touches the composite. I.e. in PlantUML MyStruct2 *-- MyStruct1. Take the example from the UML specification v2.5.1; Figure 11.5 showing a class "Car" and a class "Wheel". There the diamond is at the Car.

fractalqb avatar Oct 25 '21 15:10 fractalqb