← Prev in month ← Prev in thread
Next in thread → Next in month →

[OASIS Issue Tracker] (ODATA-1187) No way to bind nav prop on recursively nested (contained or complex) type

From
OASIS Issues Tracker <>
Date
2018-06-07T15:30:13+00:00
ID
Thread
[OASIS Issue Tracker] (ODATA-1187) No way to bind nav prop on recursively nested (contained or complex) type
Michael Pizzo created ODATA-1187:
------------------------------------

             Summary: No way to bind nav prop on recursively nested (contained or complex) type
                 Key: ODATA-1187
                 URL: https://issues.oasis-open.org/browse/ODATA-1187
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Bug
          Components: CSDL JSON , CSDL XML
    Affects Versions: V4.01_CS01
            Reporter: Michael Pizzo
             Fix For: V4.01_CS02


While we are able to bind nav props on nested complex or contained types at an arbitrary level by specifying the path, it's not possible to recursively bind nested nav props.
Consider the following complex type, containing a navigation property to Country, used within a Customer:

<ComplexType Name="Address">
	<Property Name="PreviousAddress" Type="self.PreviousAddress" Nullable="true"/>
	<NavigationProperty Name="Country" Type="self.Country"/>
</ComplexType>

We can bind the Country nav on the Address of a Customer:

<EntitySet Name="Customers" EntityType="self.Customer">
  <NavigationPropertyBinding Path="Address/Country" Target="Countries" />
  <NavigationPropertyBinding Path="Address/PreviousAddress/Country" Target="Countries" />
</EntitySet>

We could also bind the Country on the previous address property of the address of a customer:

<EntitySet Name="Customers" EntityType="self.Customer">
  <NavigationPropertyBinding Path="Address/Country" Target="Countries" />
  <NavigationPropertyBinding Path="Address/PreviousAddress/Country" Target="Countries" />
</EntitySet>

And so on…

<EntitySet Name="Customers" EntityType="self.Customer">
  <NavigationPropertyBinding Path="Address/Country" Target="Countries" />
  <NavigationPropertyBinding Path="Address/PreviousAddress/Country" Target="Countries" />
  <NavigationPropertyBinding Path="Address/PreviousAddress/PreviousAddressCountry" Target="Countries" />
   ...
</EntitySet>

What is lacking is a way to specify that all countries returned by the PreviousAddress navigation property (recursively) are contained in a particular entity set.
The same issue existings if Address is a contained navigation property.




--
This message was sent by Atlassian JIRA
(v7.7.2#77003)
← Prev in month ← Prev in thread
Next in thread → Next in month →