Skip to main content

IModel.GetRelationsByFieldOf method

Namespace: NextDesign.Core

Description

Gets the association with the specified model in the specified field. This method evaluates IContextOption.PlModelAccessMode.

If no such association exists, it returns an empty collection.

argument

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

Return value

  • IRelationshipCollection

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