IModel.RelateByClassTag method
Namespace: NextDesign.Core
Description
Returns a collection of all association instances added by associating the given model with a reference field that can be associated by an association class given the specified tag of this instance.
If a model that has been deleted or a temporary proxy is specified as the model to be associated, the association will not be performed.
Returns an empty collection if no association was made.
This method excludes fields from association that do not meet the following constraints:
[constraint to evaluate]
- Path constraints
- type constraints
- Multiplicity upper bound
- Operation availability
argument
Name | Type | Description |
---|---|---|
opposite | IModel | The associated model Cannot be null. |
classTag | string | Tag name of related class If null or an empty string is specified, the return value of this method will be an empty collection. |
value | string | The string representation of the tag value The default value is null. If null or an empty string is specified, only the presence or absence of the tag for the class is evaluated. |
Return value
- IRelationshipCollection
Exceptions
Name | Exception Class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | If null is specified for opposite |
Illegal operation | ExtensionInvalidOperationException | If self is deleted model, temporary proxy |