Navigating Associations
Virtual DataPort allows you to define relationships
(associations)
between two views. The figure below shows an association
in which the elements of the country
view can be related with the elements of
the city
view. Every country
is related with zero or more cities
.
The Service Metadata Document of the OData service represents this relationship as a navigation property.
<EntityType Name="country">
<Key>
<PropertyRef Name="country_id"/>
</Key>
<Property Name="country_id" Type="Edm.Int16"
Nullable="false"/>
<Property Name="country" Type="Edm.String" MaxLength="50"/>
<Property Name="last_update" Type="Edm.DateTimeOffset"
Precision="19"/>
<NavigationProperty Name="cities"
Type="Collection(com.denodo.odata4.city)"
Partner="country">
<ReferentialConstraint Property="country_id"
ReferencedProperty="country_id"/>
</NavigationProperty>
</EntityType>