Schema Associations

[This is preliminary documentation and subject to change.]

The ASSOCIATORS OF and REFERENCES OF statements can be used to query for schema associations in addition to querying for data associations. With data association queries, instances are returned. With schema association queries, names of classes are returned. For example, a schema query can be used to find all of the association classes defined in the schema that reference a source class.

The syntax for the ASSOCIATORS OF and REFERENCES OF statements is the same for schema association queries as it is for data association queries with two exceptions:

The complete syntax of the ASSOCIATORS OF statement for a schema query is:

associators of {SourceClass} where 
    AssocClass = AssocClassName
    ClassDefsOnly
    RequiredAssocQualifier = QualifierName
    RequiredQualifier = QualifierName
    ResultClass = ClassName
    ResultRole = PropertyName
    Role = PropertyName
    SchemaOnly

The complete syntax of the REFERENCES OF statement for a schema query is:

references of {SourceClass} where
    ClassDefsOnly
    ResultClass = ClassName
    Role = PropertyName
    RequiredQualifier = QualifierName
    SchemaOnly

For example, the following query returns the Protocol and Driver classes, the two classes that refer to the source class:

associators of {Adapter} where 
    SchemaOnly

This next query returns only the Driver class because of the restriction placed by the AssocClass keyword:

associators of {Adapter} where 
    AssocClass = AdapterDriver
    SchemaOnly