A data/_Relationship!Relationship that works by querying the related source for features.

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.

keyField: string

The key field in the source.

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.

relatedSource: FeatureSource

The feature source with related data, if available.

relationshipType: string = "QueryBasedRelationship"

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 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