API Reference > imodeljs-backend > Relationships > ElementRefersToElements > insert insert MethodStatic Insert a new instance of the Relationship. insert<T extends ElementRefersToElements<T>>(iModel: IModelDb, sourceId: string, targetId: string): string Parameter Type Description iModel IModelDb The iModel that will contain the relationship sourceId string The sourceId of the relationship, that is, the driver element targetId string The targetId of the relationship, that is, the driven element Returns - string The Id of the inserted Relationship. Defined in core/backend/src/Relationship.ts Line 101 Last Updated: 12 June, 2024