Skip to main content

IModel.Relate method

Namespace: NextDesign.Core

Description

Returns an additional associated instance, associating the given model with the end of the specified field of this instance.

argument

NameTypeDescription
fieldNamestringField name
You cannot specify null or an empty string.
oppositeIModelThe associated model
Cannot be null.

Return value

Exceptions

NameException ClassDescription
Invalid argumentExtensionArgumentExceptionIf null is specified for opposite
If null or an empty string is specified for fieldName
Field not foundExtensionFieldNotFoundExceptionIf the specified field is not found in this instance's metaclass
Illegal operationExtensionInvalidOperationExceptionIf the model itself is a deleted model or a temporary proxy
If an inoperable field is specified in the field name
- Product line feature assignment field
- System. Core tagged fields
- owning fields
Constraint ViolationExtensionIllegalFieldAccessExceptionIf the associated model is incompatible with the data type of the specified field
If the association violates the multiplicity constraint of the field
The association violates the path constraint of the field case
ExtensionInvalidModelException with an invalid model