Relationship
require(["esri/layers/support/Relationship"], function(Relationship) { /* code goes here */ });esri/layers/support/RelationshipRepresents a relationship between two FeatureLayers. These relationships are listed in the ArcGIS Services directory as described in the REST API documentation.
- See also:
Constructors
- 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 | |
|---|---|---|---|---|
| cardinality | 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 |
| declaredClass | String | The name of the class. more details | more details | Accessor |
| id | Number | The unique ID for the relationship. more details | more details | Relationship |
| keyField | String | The field used to establish the relate within the FeatureLayer. more details | more details | Relationship |
| name | String | The name of the relationship. more details | more details | Relationship |
| relatedTableId | Number | The unique ID of the related FeatureLayer. more details | more details | Relationship |
Property Details
- cardinalityString
The cardinality which specifies the number of objects in the origin FeatureLayer related to the number of objects in the destination FeatureLayer. A relationship can have one of three cardinalities:
- "one-to-one"
- "one-to-many"
- "many-to-many"
Please see the Desktop help for additional information on cardinality.
- Default Value:null
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className.
- idNumber
The unique ID for the relationship. These ids for the relationships the FeatureLayer participates in are listed in the ArcGIS Services directory.
- Default Value:null
- keyFieldString
The field used to establish the relate within the FeatureLayer.
- Default Value:null
- nameString
The name of the relationship.
- Default Value:null
- relatedTableIdNumber
The unique ID of the related FeatureLayer.
- Default Value:null
API Reference search results
| Name | Type | Module |
|---|