CollectionDef CollectionItem Collection

Meta Data Services Programming

Meta Data Services Programming

CollectionDef CollectionItem Collection

Every RelationshipDef object has two CollectionDef objects. You can navigate a relationship definition instance from either of two directions. That is, from a RelationshipDef object, you can navigate to its collection of CollectionDef objects. Conversely, you can navigate from a CollectionDef object to the associated RelationshipDef object. To do this, use the CollectionItem collection on the ICollectionDef interface. For more information about collections and relationships, see Repository Object Architecture.

Syntax

Set variable  =  object.CollectionItem(index)

The CollectionItem collection syntax has the following parts.

Part Description
variable A variable declared as a RelationshipDef object. It receives the specified relationship definition object.
object An object expression that evaluates to a CollectionDef object.
index An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.CollectionItem.Count. For more information, see Selecting Items in a Collection.
Remarks

The following characteristics are true for this collection.

Collection characteristic Value Description
Relationship Type Collection_Contains_Items This is the type of relationship by which all items of the collection are connected to a common source object.
Source Is Origin Yes The source object for the collection is also the origin object.
Minimum Collection Size Zero The minimum number of items that must be contained in the collection is zero.
Maximum Collection Size One The maximum number of items that can be contained in the collection is one.
Sequenced Collection No As a destination collection, this does not have an explicitly defined sequence. Collections of origin objects are never sequenced.
Deletes Propagated No Deleting an origin object or a relationship in the collection does not cause the deletion of a corresponding destination object.
Destinations Named No The relationship type for the collection does not permit the naming of destination objects.
Case-sensitive Names Not applicable Case-sensitive naming is not applicable for this collection.
Unique Names Not applicable Unique naming is not applicable for this collection.

See Also

CollectionDef Object

RelationshipDef ItemInCollections Collection

RelationshipDef Object