IModel.FindRelatableModels Method
Namespace: NextDesign.Core
Description
Gets models that can be related to this model by the specified reference field.
If the base model of the search range is not specified, the entire project will be searched.
If the base model of the search range is specified, the model that can be related will be searched from the models under that model element.
In this case, the model obtained will not include the relationship. For fields that refer to relationships, call without specifying the base model of the search range.
If the specified field is not a reference field, an empty collection will be returned.
Arguments
Name | Type | Description |
---|---|---|
fieldName | string | Name of the field to be associated Null or an empty string cannot be specified. |
scope | IModel | Model that is the base point of the search range. If not specified, the entire project will be searched. The default value is null. |
Return value
- IModelCollection
Exceptions
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | When null or an empty string is specified for fieldName |
Field not found | ExtensionFieldNotFoundException | When the specified field is not found in the metaclass of this instance |