A data/_Relationship!Relationship that works by querying the queryRelatedRecords endpoint of a FeatureLayer, Table, or ArcGIS Sublayer.

Type Parameters

Hierarchy (view full)

Constructors

Properties

_handles: Handles<unknown, ResourceHandle>
_id: string

The unique ID for this entity. Once set, this should never change.

_itemType: string = ItemType.RELATIONSHIP

The item type for this entity when it participates in an App.

_source: FeatureSource

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

cardinality: Cardinality

The cardinality of the relationship.

destinationForeignKey: string

In attributed relationships, this is the foreign key in the intermediate table that relates the rows of the intermediate table to the destination layer or table. This property will only be exposed if the relationship is attributed.

keyField: string

The key field in the source.

originForeignKey: string

In an attributed relationship, originForeignKey is the foreign key in the intermediate table, which relates the rows of the intermediate table to the origin layer or table. This property will only be exposed if the relationship is attributed.

queryService: QueryService

The tasks/query/QueryService!QueryService to use for fetching related features. The service must be configured with a provider that can handle the related source.

relatedKeyField: string

The key field in the related source. Needed for two-sided relationships but isn't needed for one-sided ones.

relatedSource: FeatureSource

The feature source with related data, if available.

relationshipTableId: number

The ID of the intermediate table in the feature service for attributed relationships. This property will only be exposed if the relationship is attributed.

relationshipType: string = "ArcGISRelationship"

The type of relationship.

title: string

The human-readable name for the relationship.

Accessors

  • get id(): string
  • The unique ID for this entity.

    Returns string

  • get isAttributed(): boolean
  • Whether the relationship is attributed.

    Returns boolean

  • get itemType(): string
  • The item type for this entity when it participates in an App.

    Returns string

  • get source(): FeatureSource
  • The feature source that owns this relationship.

    Returns FeatureSource

Methods

  • Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

    Returns Promise<void>

  • Called after normal initialization. Note: Child items are initialized before this is called.

    Returns Promise<void>

  • Sets the properties for this item.

    Parameters

    • properties: Partial<TProperties>

      A plain object containing property values to set, keyed by property name.

    Returns void

  • Sets the properties for this item.

    This version will also await any asynchronous logic that is needed to set the properties.

    Parameters

    • properties: Partial<TProperties>

      A plain object containing property values to set, keyed by property name.

    Returns Promise<void>

  • A clean-up function that should get called whenever the item is disposed of.

    Returns Promise<void>

  • Waits for all deserialization logic initiated thus far to finish, whether invoked by passing properties into the constructor, or by invoking assignProperties() or assignPropertiesAsync().

    Returns Promise<void>

  • Gets the default value of an object's property.

    Type Parameters

    • K extends string | number | symbol

    Parameters

    • key: K

      The property of the object for which to get the default value.

    Returns TProperties[K]

  • Returns a serializable representation of the item.

    Parameters

    • serializeMode: SerializeMode = "all"

      If specified, only properties that are appropriate for the given mode are returned. Otherwise, all properties will be serialized.

    Returns TProperties