A class that contains a relationship that a table or layer participates in.
Property |
Type |
Description |
Name |
string |
Name of the relationship from the view point of the table. |
RelationshipID |
int |
The unique identifier of the relationship class in the geodatabase. For a relationship between two tables, it is unique in the service. |
RelatedTableID |
int |
Id of the related layer or table. |
Remarks
Use MapServerInfo to get the list of MapLayerInfo or StandaloneTableInfo available to the map. If a layer or a table participates in a relationship, MapServer advertises that by populating that information as this object.
When there are more than one relationships exist between the same source and destination table(s) or layer(s), RelationshipID can be used to uniquely identify a relationship.
In order for MapServer to advertise a relationship, both source and destination layer/standalone table must be added to the source map document.
Feature Service Example of the name of the relationship from the table’s point of view given below:
If there is a relationship between Parcel and Owner tables. Relationship name in Parcel table will be "OwnedBy" and in Owner table it will be "Owns".
These names are obtained from geodatabase relationship class as follows: Name of Relate for an Origin Table is RelationshipClass’ Forward label. Name of Relate for a destination Table is ReleationshipClass’ Backward label.
Examples