queryInstancesProps Method @beta
Get the props of multiple Relationship instances of the same class using batched queries.
This produces the same results as calling tryGetInstanceProps for each entry in criteria, but executes at most two queries regardless of the number of entries.
queryInstancesProps<T extends RelationshipProps>(relClassFullName: string, criteria: ReadonlyArray<string | SourceAndTarget>, options?: { usePrimaryConn?: boolean }): Promise<T | undefined[]>
@returns An array with the same length and order as criteria. Each entry holds the RelationshipProps matching the corresponding criterion, or undefined if no such relationship was found.
@see - tryGetInstanceProps
- queryInstances
| Parameter | Type | Description |
|---|---|---|
| relClassFullName | string | The full class name of the relationship in the form of "schema:class" |
| criteria | ReadonlyArray<string | SourceAndTarget> | The relationships to look up. Each entry is either a relationship instanceId or the source and target Ids. Entries of both kinds may be mixed. |
| options | { usePrimaryConn?: boolean } |
Returns - Promise<T | undefined[]>
An array with the same length and order as criteria. Each entry holds the RelationshipProps matching the corresponding criterion, or undefined if no such relationship was found.
Defined in
- backend/src/Relationship.ts Line 651
Last Updated: 05 November, 2026