ElementRefersToElements Class
A Relationship where one Element refers to another Element
Extends
Extended by
- DrawingGraphicRepresentsElement
- GraphicalElement3dRepresentsElement
- SynchronizationConfigProcessesSources
- ElementGroupsMembers
- PhysicalElementFulfillsFunction
Methods
| Name | Description | |
|---|---|---|
| constructor(props: RelationshipProps, iModel: IModelDb): ElementRefersToElements Protected | ||
| collectReferenceIds(referenceIds: EntityReferenceSet): void Protected | Collect the Ids of this entity's references at this level of the class hierarchy. | |
| create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: string, targetId: string): T Static | Create an instance of the Relationship. | |
| insert<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: string, targetId: string): string Static | Insert a new instance of the Relationship. |
Inherited methods
| Name | Inherited from | Description |
|---|---|---|
| delete(): void Inherited | Relationship | Delete this Relationship from the iModel. |
| forEach(func: PropertyHandler, includeCustom: boolean = true): void Inherited | Relationship | Call a function for each property of this Entity. |
| forEachProperty(func: PropertyCallback, includeCustom: boolean = true): void Inherited | Relationship | Call a function for each property of this Entity. |
| getMetaData(): Promise<RelationshipClass> Inherited | Relationship | Query metadata for this relationship class from the iModel's schema. |
| getReferenceIds(): EntityReferenceSet Inherited | Relationship | Get the set of this entity's entity references, EntityReferenceSet. |
| insert(): string Inherited | Relationship | Insert this Relationship into the iModel. |
| toJSON(): RelationshipProps Inherited | Relationship | Obtain the JSON representation of this Entity. |
| update(): void Inherited | Relationship | Update this Relationship in the iModel. |
| deserialize(props: DeserializeEntityArgs): EntityProps Static Inherited | Relationship | Converts an ECSqlRow of an Entity to an EntityProps. |
| getInstance<T extends Relationship>(iModel: IModelDb, criteria: string | SourceAndTarget): T Static Inherited | Relationship | |
| is(otherClass: Entity): boolean Static Inherited | Relationship | return whether this Entity class is a subclass of another Entity class |
| onDeletedDependency(_props: RelationshipProps, _iModel: IModelDb): void Static Inherited | Relationship | Callback invoked by saveChanges on an ElementDrivesElement relationship when the relationship instance has been deleted. |
| onRootChanged(_props: RelationshipProps, _iModel: IModelDb): void Static Inherited | Relationship | Callback invoked by saveChanges on an ElementDrivesElement relationship when its input has changed or is the output of some upstream relationship whose input has changed. |
| serialize(props: EntityProps, _iModel: IModelDb): ECSqlRow Static Inherited | Relationship | Converts an EntityProps to an ECSqlRow. |
Properties
| Name | Type | Description | |
|---|---|---|---|
| className Accessor Static ReadOnly | string | The name of the BIS class associated with this class. |
Inherited properties
| Name | Type | Inherited from | Description |
|---|---|---|---|
| _customHandledProps Protected Static Readonly Inherited | CustomHandledProperty[] | Relationship | List of properties that are need to be custom handled during deserialization and serialization. |
| _metadata Protected Inherited | EntityClass | RelationshipClass | Relationship | Cached Metadata for the ECClass |
| classFullName Accessor Inherited ReadOnly | string | Relationship | Get the full BIS class name of this Entity in the form "schema:class". |
| classFullName Accessor Static Inherited ReadOnly | string | Relationship | Get the full BIS class name of this Entity in the form "schema:class" |
| className Accessor Inherited ReadOnly | string | Relationship | The name of the BIS class associated with this class. |
| id Inherited | string | Relationship | The Id of this Entity. |
| iModel Inherited | IModelDb | Relationship | The IModelDb that contains this Entity |
| isInstanceOfEntity Readonly Inherited | "true" | Relationship | An immutable property used to discriminate between Entity and EntityProps, used to inform the TypeScript compiler that these two types |
| schema Static Inherited | Schema | Relationship | The Schema that defines this class. |
| schemaItemKey Accessor Inherited ReadOnly | SchemaItemKey | Relationship | Get the item key used by the ecschema-metadata package to identify this entity class |
| schemaItemKey Accessor Static Inherited ReadOnly | SchemaItemKey | Relationship | Serves as a unique identifier for this class. Typed variant of classFullName. |
| schemaName Accessor Inherited ReadOnly | string | Relationship | The name of the BIS Schema that defines this class |
| sourceId Readonly Inherited | string | Relationship | |
| targetId Readonly Inherited | string | Relationship |
Defined in
- core/backend/src/Relationship.ts Line 85
Last Updated: 29 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.