InterfaceDef CreateRelationshipColDef Method

See Also

This method creates a new collection type, attaches it to this interface, and associates it with the specified relationship type.

Syntax

Set variable = object.CreateRelationshipColDef( sObjId, name, dispId, isOrigin, flags, relshipDef )

The CreateRelationshipColDef method syntax has the following parts.

Part Description
object An object expression that evaluates to an InterfaceDef object.
variable A variable declared as a CollectionDef object. Receives the new collection definition.
sObjId The object identifier for the collection type. The Repository engine will assign an object identifier if you set this parameter to OBJID_NULL.
name The name of the new collection type.
dispId The dispatch identifier to be used for Automation access to collections of this type.
isOrigin Specifies whether collections of this type are origin collections. This is a Boolean parameter.
flags Flags that specify naming, sequencing, and delete propagation behavior for the collection type. (See the CollectionDefFlags Enumeration for a list of values and their specific purposes.)
relshipDef The relationship definition object to which this collection type is connected.

Remarks

By default, the collection definition specifies that zero to many items are permitted in collections of this type. To specify a different minimum and maximum item count for the new collection type, change the MinCount and MaxCount properties before committing the transaction that contains this method invocation.