Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1187

No way to bind nav prop on recursively nested (contained or complex) type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: CSDL JSON, CSDL XML
    • Labels:
      None
    • Environment:

      Applied

      Description

      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.Address" 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" />
      </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/PreviousAddress/Country" 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.

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo (Inactive)
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: