A relationship connects two Repository objects in the Repository database. In this release of the Microsoft 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 Visual Basic®:
Dim myRship As VersionedRelationship
In earlier releases of the Repository, the object model included the Relationship class, but not the VersionedRelationship class. If you have Visual Basic programs written against earlier releases of the Microsoft Repository, those programs might include declarations like the following:
Dim oldRship As Relationship
These programs will still work, because the Repository’s object model still includes the Relationship class. Visual Basic still recognizes preceding the declaration as valid. But remember that in this release of Microsoft 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, the 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