Add Relationship Types and Pairs of Collection Types
Relationships connect objects to each other in a Microsoft® SQL Server™ 2000 Meta Data Services repository. When you define a new relationship type, you also define an origin collection type and a destination collection type. The origin collection type connects the relationship type to one interface; the destination collection type connects the relationship type to a second interface. The classes that implement those interfaces are now related in your information model.
To create a new relationship type (and its corresponding pair of collection types) and attach it to two interfaces
- Use the CreateRelationshipDef method of the IReposTypeLib interface that is exposed by your ReposTypeLib object. Then, use the CreateRelationshipCol method to create the collection. For more information, see Defining a Collection.
Note One of the relationship types that you create for your information model must enable navigation from the root object of the repository to some objects of your information model. For more information about why you need this interface, see Information Model Creation Issues.
See Also
Add Properties to Each Interface