IRelationship.Relate method
Namespace: NextDesign.Core
Description
Replaces the association end of this association with the specified model.
Path constraints and multiplicity constraints are not checked by this method.
argument
Name | Type | Description |
---|---|---|
source | IModel | The source model You cannot specify null. |
target | IModel | Destination model You cannot specify null. |
sourceIndex | int | Position of the new source Specifies the index starting from 0. The destination model will be the additional position in the field that references the origin. If the specified index is outside the range of the number of elements in the corresponding field on the related destination side, it will be added to the end. |
targetIndex | int | Position of the new destination Specifies the index starting at 0. The model on the related source side will be the additional position in the field that refers to the related destination. If the specified index is outside the range of the number of elements in the corresponding field on the origin side, it will be added to the end. |
Return value
- void
Exceptions
Name | Exception Class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | If null is specified for source or target |
The specified model is invalid | ExtensionInvalidTypeException | If a value that cannot be set to the specified association end is specified - The specified model type is incompatible with the model type of the new association end |
Illegal operation | ExtensionInvalidOperationException | If self is a deleted model, temporary proxy If an inoperable relationship is specified for this relationship - Product Line Feature Assignment Related - System. Association tagged with Core - Owned association |
Invalid model specified | ExtensionInvalidModelException | If a deleted model or temporary proxy is specified for the model of the origin of the relationship or the destination of the relationship |