insertRelationship Method

Insert a new relationship into the iModel.

insertRelationship(props: RelationshipProps): string

@returns The Id of the newly inserted relationship.

@throws EditTxnError if this EditTxn is not active.

@throws IModelError if the class is invalid for link-table insertion.

Parameter Type Description
props RelationshipProps The properties of the new relationship.

Returns - string

The Id of the newly inserted relationship.

Defined in

Last Updated: 28 April, 2026