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

Consider support of NavigationPropertyBindings to non-contained nav props

    Details

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

      Applied

    • Proposal:
      Hide

      Apply ODATA-674 as an annotation term in the Validation vocabulary "ItemsOf". The value of the ItemsOf annotation is a collection of complex types containing two path properties; "path" and "target". A path indicating the same navigation property can occur multiple times, appended with different cast segments, in which case the most specific path is applied. The target can be any collection-valued navigation property. If the target is a containment navigation property then the constraint defines where the entity lives.

      Show
      Apply ODATA-674 as an annotation term in the Validation vocabulary "ItemsOf". The value of the ItemsOf annotation is a collection of complex types containing two path properties; "path" and "target". A path indicating the same navigation property can occur multiple times, appended with different cast segments, in which case the most specific path is applied. The target can be any collection-valued navigation property. If the target is a containment navigation property then the constraint defines where the entity lives.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/60253/odata-csdl-json-v4.01-wd01-2017-03-10.docx https://www.oasis-open.org/committees/download.php/60254/odata-csdl-xml-v4.01-wd02-2017-03-10.docx

      Description

      NavigationPropertyBindings are used to identify the set in which members of a navigation property are defined. The target set can be an entity set or an instance of a containment navigation property.

      There are cases where it is interesting to specify that members of a navigation property are members of another navigation property that may not necessarily be where they are defined.

      For example, if I have a customer with navigation properties "AllOrders", "OpenOrders", and "ClosedOrders", it may be useful to define that members of "OpenOrders" and "ClosedOrders" are all members of the "AllOrders" navigation property, even though they are defined in an "Orders" entity set.

      NavigationPropertyBinding has the right syntax and semantics for this, if we relax the constraint that the target of the navigationpropertybinding must terminate on a containment navigation property.

      However, this may be mixing semantics of the existing NavigationPropertyBinding, which specifies the set in which an entity is defined, and a constraint that says members of one navigation property must be children of another navigation property, so perhaps we should instead define a NavigationPropertyConstraint that says instances are members of a related navigation property that may or may not be the one in which they are defined...

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: