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

User Manual    [Previous]   [Next]   

W1011 Invalid Association Class Key

Umple semantic warning reported when an Association Class key is missing a required member.

For Association Classes with explicit keys, each class that participates in the relationship should be declared as a member of that key.

Example

// This example generates the warning
// because one participating class is
// missing from the key
class Passenger {}

class Flight {}

associationClass Booking {
  Integer number;
  * Passenger passenger;
  * Flight flight;
  key {number, flight}
}

      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// This example shows how to remove
// the warning by completing the key
class Passenger {}

class Flight {}

associationClass Booking {
  Integer number;
  * Passenger passenger;
  * Flight flight;
  key {number, flight, passenger}
}

      

Load the above code into UmpleOnline