umlclass-diagramobject-diagram

How to use correctly nonunique in UML?


Is it possible to connect a1 with b1 twice on (object diagram), while A has only one B object and it is {nonunique}?

enter image description here


Solution

  • nonunique constraint has sense only if upper multiplicity is higher than zero (while of course you are still allowed to use it anyway). It means that in a particular association with a specific object the same object on the other side can be used more than once.

    I believe that's what you wanted to achieve, however the constraint should be on the other end of the association (the one with multiplicity *).