2

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

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
DM14
  • 188
  • 3
  • 13

2 Answers2

3

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 *).

Ister
  • 5,958
  • 17
  • 26
2

Your diagram shows just classes. Objects have an underlined name and usually do not show compartments.

The {nonunique} constraint in the multiplicity just tells that B must not be unique.

The double association between a1 and b1 is absolutely legal. However, without a role name it's rather pointless and a single association would be enough.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86