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

Annotation of implicit entity sets

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CSD03
    • Fix Version/s: V4.0_CSD04
    • Labels:
      None
    • Environment:

      Proposed

    • Proposal:
      Hide

      Make use of existing specification text in section 14.2.2 Target.

      For vocabulary terms Aggregation.CustomAggregate and Aggregation.ApplySupported, add AppliesTo="Collection" and tag these terms with a new annotation in the Core vocabulary:

      <Term Name="AppliesViaContainer" Type="Core.Tag" DefaultValue="true" Nullable="false" AppliesTo="Term">
       <Annotation Term="Core.Description" String="The target path of an annotation with this term must start with an entity container or the annotation must be embedded within an entity container, entity set or singleton"/>
      </Term>
      

      Deprecate terms Groupable, Aggregatable, complex type NavigationPropertyAggregationCapabilities.

      For compatibility reasons, do not use this technique for annotations in the Capabilities vocabulary.

      Show
      Make use of existing specification text in section 14.2.2 Target . For vocabulary terms  Aggregation.CustomAggregate  and Aggregation.ApplySupported , add  AppliesTo="Collection" and tag these terms with a new annotation in the Core vocabulary: <Term Name= "AppliesViaContainer" Type= "Core.Tag" DefaultValue= "true" Nullable= "false" AppliesTo= "Term" > <Annotation Term= "Core.Description" String= "The target path of an annotation with this term must start with an entity container or the annotation must be embedded within an entity container, entity set or singleton" /> </Term> Deprecate terms Groupable , Aggregatable , complex type NavigationPropertyAggregationCapabilities . For compatibility reasons, do not use this technique for annotations in the Capabilities vocabulary.
    • Resolution:
      Show
      PR #101 .

      Description

      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.

      An easier alternative would be to use external targeting with a path that ends in a containment navigation property:
       

      <Annotations Target="namespace.ContainerName/me/Mails">
       <Annotation Term="Aggregation.CustomAggregate" Qualifier="JunkRating" String="Edm.Int32"/>
      </Annotations>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              heiko.theissen Heiko Theissen
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: