list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

W036 Unmanaged Multiplicity

Umple semantic warning generated when a directed association has a multiplicity with hard constraints

Umple generates code to manage the manipulation of the directed end (with the arrowhead) of a directed association. However there are no inverse references in such a case. In the example below, there are no references from class B to class X. As a result, the multiplicity on the undirected end is purely 'documentation'.

Specifying a hard constraint such as 1 or 2 for the upper or lower bound in such a case may be misleading and is typically incorrect. This error is raised whenever the multiplicity is other than * or 0..1

Example

// The following will generate this warnbing

class X {
  1 -> * B first;
  1..3 -> * B second;
  0..2 -> * B third;
}

class B {}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// The following solves the problem
// by either making the association unndirected
// or making the bounds have soft constraints

namespace W036UnmanagedMultiplicity2;

class X {
  0..1 -> * B first;
  * -> * B second;
  0..2 -- * B third;
}

class B {}
      

Load the above code into UmpleOnline