Relationship Class

Meta Data Services Programming

Meta Data Services Programming

Relationship Class

A relationship connects two repository objects in a repository database. In this release of the repository engine, relationships are versioned. That is, every relationship is a VersionedRelationship object. A versioned relationship can connect a particular version of a repository object to one or more specific versions of the target object. Because every relationship is a VersionedRelationship object, you can declare any relationship with the following line of Microsoft® Visual Basic®:

Dim myVersionedRship As VersionedRelationship

In earlier releases of the repository engine, the object model included the Relationship class, but not the VersionedRelationship class. If you have Visual Basic programs written against earlier releases of the repository engine, those programs might include declarations like the following:

Dim oldRship As Relationship

These programs will work, because the repository object model still includes the Relationship class. Visual Basic recognizes the Relationship declaration as valid. But in this release, every relationship is a versioned relationship. So the object oldRship, even though it is declared as a Relationship, must conform to the VersionedRelationship class.

To ensure that objects declared as Relationship conform to the VersionedRelationship class, the repository engine uses the same Class Factory for both classes. In this way, any object that you declare as a Relationship implements the exact same methods as any object that you declare as a VersionedRelationship. In effect, the following two lines of Visual Basic code are identical:

Dim oldRship As Relationship
Dim myVersionedRship As VersionedRelationship
Interfaces
Interface Description
IAnnotationalProps Gets and sets annotational properties
IRelationship Connects two objects in an information model

See Also

IAnnotationalProps Interface

IRelationship Interface

IRepositoryDispatch Interface

IRepositoryItem Interface

RelationshipCol Class

Repository Engine Classes

VersionedRelationship object