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

Variant of NavigationPropertyBinding for containment navigation properties



    • Type: New Feature
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.02_WD01
    • Component/s: CSDL JSON , CSDL XML
    • Labels:


      NavigationPropertyBindings are used to assign an entity set to a Path ending in a non-containment navigation property. The assigned entity set can then be the target for annotations like Aggregation.CustomAggregate (see https://issues.oasis-open.org/browse/ODATA-1382).

      Paths ending in a containment navigation property, which implicitly define an entity set, are treated totally different, however. In order to define a custom aggregate on this implicit entity set, the annotation Capabilities.NavigationRestrictions with type Aggregation.NavigationPropertyAggregationCapabilities/CustomAggregates must be used.

      I propose a "variant" of NavigationPropertyBinding that can be used with a Path ending in a containment navigation property and which do not specify a BindingTarget, but serve as target for annotations. This would make the NavigationRestrictions annotation obsolete and the example in #92 could be rewritten as

      <Singleton Name="me" …>
       <NavigationPropertyBindingVariant Path="Mails">
        <Annotation Term="Aggregation.CustomAggregate" Qualifier="JunkRating" String="Edm.Int32"/>

      Instead of introducing a new element NavigationPropertyBindingVariant (working title), the existing NavigationPropertyBinding could be extended: The Target attribute is no longer mandatory, and if it is absent

      • the Path must end in a containment navigation property
      • the NavigationPropertyBinding can be the target for any annotation whose term AppliesTo="EntitySet" (no need to specify AppliesTo="NavigationPropertyBinding"). These annotations then apply to the implicit entity set defined by the containment navigation property.




            • Assignee:
              heiko.theissen Heiko Theissen
            • Watchers:
              1 Start watching this issue


              • Created: