Using TargetObjectCol with Relationship Collections

The TargetObjectCol class provides a convenient way to manipulate relationship collections. When you manipulate a target object collection, you actually manipulate the corresponding relationship collection.

For example, suppose you are manipulating the target object collection describing the employees managed by Frank, shown in the following figure.

Now suppose you want to add Louise, an existing employee, to the collection. To do so, use the Add method, extending the collection to look like the collection in the following figure.

When you call the Add method, Microsoft® Repository actually adds a relationship to the corresponding relationship collection. In effect, you changed the data from this:

to this:

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.