Skip to main content

IModel.Relate method

Namespace: NextDesign.Core

Description

Returns the associated instance you added, associating the given model at the end of the specified field for this instance.

argument

NameTypeDescription
fieldNamestringField name
Null or an empty string cannot be specified.
oppositeIModelAssociate model
Null cannot be specified.

Return value

Exception

NameException ClassDescription
Invalid argumentExtensionArgumentExceptionWhen null is specified for opposite
When null or an empty string is specified for fieldName
Field not foundExtensionFieldNotFoundExceptionIf the specified field is not found in the metaclass of this instance
Illegal operationExtensionInvalidOperationExceptionIf it is a deleted model or temporary proxy
If an inoperable field is specified in the field name
-Product line feature assignment field
-System. Fields with Core tags
-Owned fields
Constraint violationExtensionIllegalFieldAccessExceptionWhen the associated model is incompatible with the specified field data type
When the association violates the field multiplicity constraint
The association violates the field path constraint. If
Invalid model specifiedExtensionInvalidModelExceptionWhen a deleted model or temporary proxy is specified for the associated model