Relationship Class

See Also

A relationship connects two repository objects in the Microsoft® Repository database. In this release of Repository, 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 myRship   As VersionedRelationship

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

Dim oldRship   As Relationship

These programs will still work, because the Repository object model still includes the Relationship class. Visual Basic still recognizes preceding the declaration as valid. But remember that in this release of Repository, 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 Relationships conform to the VersionedRelationship class, Repository 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 you declare as a VersionedRelationship. In effect, the following two lines of Visual Basic code are identical:

Dim myRship   As Relationship
Dim myRship   As VersionedRelationship
(c) 1988-1998 Microsoft Corporation. All Rights Reserved.