uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

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

 

Another Example

// 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