Meta Data Services Programming

Retrieving Relationship Collections

Relationship collections can be retrieved at both the COM and Automation level.

Retrieving Relationship Collections Using Automation Interfaces

To retrieve a relationship, first declare a variable as a RelationshipCol object (that is, an object that implements the IRelationshipCol interface). Next, set the variable equal to the object member that is the collection you want to retrieve.

For example, the following Microsoft® Visual Basic® code retrieves a collection of bug discoveries (a relationship collection) belonging to a particular person into the variable called DiscoveryCollection:

DIM DiscoveryCollection As RelationshipCol
DIM Person As RepositoryObjectVersion
REM Retrieve the source object into the Person variable
Set DiscoveryCollection = Person.bugs

In this example, DiscoveryCollection(1) refers to the first relationship in the collection.

Retrieving Relationship Collections Using COM Interfaces

To retrieve a relationship, you can perform the following steps:

See Also

Navigating a Repository