E181 Association Specialization Invalid Multiplicity
[Previous]  [Next] 
|
![]() |
![]() ![]() ![]() User Manual [Previous]  [Next] E181 Association Specialization Invalid MultiplicityUmple error raised when an association specialization has an invalid multiplicity
When performing an Association Specialization, the multiplicities are more specific than that of the previously defined association.
If the multiplicities on either side of the specialized association are less strict/specific, the association is considered invalid and this error is raised.
Example// This example generates the error class Vehicle {} class Wheel {} class Bicycle {isA Vehicle;} // Parent multiplicity of 0..1 to 0..2 association { 0..1 Vehicle vehicleA -- 0..2 Wheel vehicleWheel;} // Broader child multiplicity of 0..1 to 0..3 association { 0..1 Bicycle vehicleA -- 0..3 Wheel vehicleWheel;} Load the above code into UmpleOnline Solution to the above so the message no longer appears// This example shows how to resolve the error class Vehicle {} class Wheel {} class Bicycle {isA Vehicle;} // Parent multiplicity of 0..1 to 0..2 association { 0..1 Vehicle vehicleA -- 0..2 Wheel vehicleWheel;} // Narrower child multiplicity of 0..1 to 0..1 association { 0..1 Bicycle vehicleA -- 0..1 Wheel vehicleWheel;} Load the above code into UmpleOnline |