IModel.GetRefRelatedModels(string,bool) Method
Namespace: NextDesign.Core
Description
Gets instances that are in a reference relationship with this instance by the specified related class.
If the related class is not specified (null), all referenced instances are obtained.
This method evaluates IContextOption.PlModelAccessMode.
This method returns an empty collection in the following cases:
- There is no instance related by the corresponding reference relationship
- The specified related class cannot be found
- The reference field by the specified related class cannot be found
If the specified related class is a self-referential relationship, both the source and destination relationships are evaluated.
Arguments
Name | Type | Description |
---|---|---|
className | string | Related class name Specify the name of the related class or the fully qualified name. If null is specified, related instances are obtained for all reference fields. The default value is null. |
fuzzy | bool | Fuzzy match option Whether to treat the className argument as the name of a class instead of a fully qualified name. If False, it is evaluated as specifying a class whose fully qualified name matches className. If True, it is evaluated as specifying a class whose class name matches className. The default value is True. |
Return value
- IModelCollection