ESM: import Relationship from "@arcgis/core/layers/support/Relationship.js";
CDN: const Relationship = await $arcgis.import("@arcgis/core/layers/support/Relationship.js");
Class: @arcgis/core/layers/support/Relationship
Since: ArcGIS Maps SDK for JavaScript 4.7
Property Overview Any properties can be set, retrieved or listened to. See the Watch for changes topic.Show inherited properties Hide inherited properties
Property Details cardinality String
The cardinality which specifies the number of objects in the origin FeatureLayer related to the number of objects in the destination FeatureLayer. Please see the Desktop help for additional information on cardinality.
Possible Values:"one-to-one" |"one-to-many" |"many-to-many"
Since: ArcGIS Maps SDK for JavaScript 4.32 Relationship since 4.7, catalogId added at 4.32.
The globally unique identifier for the relationship. This property is only available on non-hosted feature services (referencing Enterprise geodatabases).
composite Boolean
Since: ArcGIS Maps SDK for JavaScript 4.16 Relationship since 4.7, composite added at 4.16.
Indicates whether the relationship is composite. In a composite relationship, a destination object cannot exist independently of its origin object.
Inherited
Property declaredClass Stringreadonly
The name of the class. The declared class name is formatted as esri.folder.className
.
The unique ID for the relationship. These ids for the relationships the FeatureLayer participates in are listed in the ArcGIS Services directory.
keyField String
The field used to establish the relate within the FeatureLayer.
keyFieldInRelationshipTable String
Since: ArcGIS Maps SDK for JavaScript 4.16 Relationship since 4.7, keyFieldInRelationshipTable added at 4.16.
The key field in an attributed relationship class table that matches the keyField. This is returned only for attributed relationships.
The name of the relationship.
relationshipTableId Number
Since: ArcGIS Maps SDK for JavaScript 4.16 Relationship since 4.7, relationshipTableId added at 4.16.
The relationship table id.
Since: ArcGIS Maps SDK for JavaScript 4.16 Relationship since 4.7, role added at 4.16.
Indicates whether the table participating in the relationship is the origin
or destination
table.
Possible Values:"origin" |"destination"
Show inherited methods Hide inherited methods
Method DetailsInherited
Method addHandles(handleOrHandles, groupKey)
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, addHandles added at 4.25.
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles
const handle = reactiveUtils.when(
() => !view.updating,
() => {
wkidSelect.disabled = false;
},
{ once: true }
);
this.addHandles(handle);
// Destroy the object
this.destroy();
Parameters
Handles marked for removal once the object is destroyed.
groupKey *
optionalKey identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.
clone(){this}
Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.
Returns
Type Description this A deep clone of the class instance that invoked this method.Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json
parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.
Returns
Type Description * | null | undefined Returns a new instance of this class.Inherited
Method hasHandles(groupKey){Boolean}
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, hasHandles added at 4.25.
Returns true if a named group of handles exist.
Parameter
groupKey *
optionalA group key.
Returns
Type Description Boolean Returnstrue
if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
obj.removeHandles("watch-view-updates");
}
Inherited
Method removeHandles(groupKey)
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, removeHandles added at 4.25.
Removes a group of handles owned by the object.
Parameter
groupKey *
optionalA group key or an array or collection of group keys to remove.
Example
obj.removeHandles(); // removes handles from default group
obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4