IModel.RelateWhere method
Namespace: NextDesign.Core
Description
Returns a collection of all related instances that you have added, associating the given model with all reference fields that meet the specified criteria for this instance. If a deleted model or temporary proxy is specified for the model to be associated, the association will not be performed. If no association is made, an empty collection is returned.
The reference field to be associated can be arbitrarily determined by the evaluation function. However, even if the evaluation function is met, if the field meets the following conditions, the association will not be performed and the field will end normally.
- When the path constraint of the field is violated
- If the field type is not compatible with the given model ใป When the multiplicity of fields is exceeded
- When the field that matches the condition is the following inoperable field
- Product line feature assignment field
- Fields with the System.Core tag
argument
Name | Type | Description |
---|---|---|
opposite | IModel | Associate model Null cannot be specified. |
instance | Func <IField, bool> | Field evaluation function First argument: Field Return value: True null was specified when associating in the corresponding field. If so, returns a collection of all related instances that you have added, associating the given model with any reference field that can be associated with the given model of this instance. |
Return value
- IRelationshipCollection
Exception
Name | Exception Class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | When null is specified for opposite |
Illegal operation | ExtensionInvalidOperationException | If it is a deleted model or temporary proxy |