getInstance Method

Get a Relationship instance

getInstance<T extends Relationship>(relClassSqlName: string, criteria: string | SourceAndTarget): T

@throws IModelError if the relationship is not found or cannot be loaded.

@see tryGetInstance

Parameter Type Description
relClassSqlName string  
criteria string | SourceAndTarget Either the relationship instanceId or the source and target Ids

Returns - T

Defined in

Last Updated: 16 June, 2025