KeyRef Checks

PowerDesigner provides default model checks to verify the validity of KeyRefs.

Check

Description and Correction

Name/Code contains terms not in glossary

[if glossary enabled] Names and codes must contain only approved terms drawn from the glossary.
  • Manual correction - Modify the name or code to contain only glossary terms.
  • Automatic correction - None.

Name/Code contains synonyms of glossary terms

[if glossary enabled] Names and codes must not contain synonyms of glossary terms.
  • Manual correction - Modify the name or code to contain only glossary terms.
  • Automatic correction - Replaces synonyms with their associated glossary terms.

Name/Code uniqueness

Object names must be unique in the namespace.
  • Manual correction - Modify the duplicate name or code.
  • Automatic correction - Appends a number to the duplicate name or code.

Undefined reference

A keyRef must contain a reference to a key or a unique constraint.

  • Manual correction: In the keyRef property sheet, define a reference to a key or a unique constraint with the Reference list.

  • Automatic correction: None

Existence of fields

A keyRef must contain at least one field.

  • Manual correction: Add at least one field to the keyRef or delete the keyRef. For example: @numEmployee.

  • Automatic correction: Deletes unassigned keyRef.

For more information on fields, see Constraint Properties.

Undefined selector

You must define an XPath expression for a keyRef selector attribute.

  • Manual correction: In the keyRef property sheet, define an XPath expression for the selector attribute. For example: s:company/s:employee.

  • Automatic correction: None

For more information on XPath expressions, see Constraint Properties.