Customizing the metamodel > Specifying key and keyed by properties > Examples of key and keyed by > A third definition with two key properties
  
A third definition with two key properties
This section takes the example in One definition keyed by another further. Each “Car Model” has a version: for example, you can buy a Mustang Coupe, a Convertible, a GT Coupe, a GT Convertible, a Mach 1, or SVT Cobra.
This could be an ever changing list, so it is a definition type (instead a static LIST). Call the definition type “Car Version”. When a user creates a “Car Version”, they also have to specify its “Car Brand” and “Car Model” (because there might be many “Car Models with a GT).
RENAME DEFINITION "User 3" TO "Car Version"
Definition "Car Version"
{
Property "Car Model"
{ KEY Edit ONEOF "Car Model" RELATE BY "is keyed by" }
Property "Brand"
{ KEY EDIT ONEOF "Car Brand" RELATE BY "is keyed by"}
}
This graphic is described in the surrounding text.
Next, see Creating a list of a keyed definition.
See also
Examples of key and keyed by