Relationship
require(["esri/layers/support/Relationship"], function(Relationship) { /* code goes here */ });
esri/layers/support/Relationship
Describes a layer's relationship with another layer or table. These relationships are listed in the ArcGIS Services directory as described in the REST API documentation.
Constructors
- new Relationship(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The cardinality which specifies the number of objects in the origin FeatureLayer related to the number of objects in the destination FeatureLayer. more details | more details | Relationship | |
Boolean | Indicates whether the relationship is composite. more details | more details | Relationship | |
String | The name of the class. more details | more details | Accessor | |
Number | The unique ID for the relationship. more details | more details | Relationship | |
String | The field used to establish the relate within the FeatureLayer. more details | more details | Relationship | |
String | The key field in an attributed relationship class table that matches the keyField. more details | more details | Relationship | |
String | The name of the relationship. more details | more details | Relationship | |
Number | The unique ID of the related FeatureLayer. more details | more details | Relationship | |
Number | The relationship table id. more details | more details | Relationship | |
String | Indicates whether the table participating in the relationship is the | more details | Relationship |
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"
- composite BooleanSince: ArcGIS API for JavaScript 4.16
Indicates whether the relationship is composite. In a composite relationship, a destination object cannot exist independently of its origin object.
The name of the class. The declared class name is formatted as
esri.folder.className
.
- id Number
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 StringSince: ArcGIS API for JavaScript 4.16
The key field in an attributed relationship class table that matches the keyField. This is returned only for attributed relationships.
- name String
The name of the relationship.
The unique ID of the related FeatureLayer.
- relationshipTableId NumberSince: ArcGIS API for JavaScript 4.16
The relationship table id.
- role StringSince: ArcGIS API for JavaScript 4.16
Indicates whether the table participating in the relationship is the
origin
ordestination
table.Possible Values:"origin"|"destination"