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

Use NavProp@<annotation-name> to reference annotations applied to a NavProp

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_WD01
    • Fix Version/s: V4.0_CSD03
    • Component/s: CSDL XML
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      Currently we are not able to reference an annotation applied to a navigation property.
      In the following example the expression <Path>Supplier/@Core.Description#Bar</Path> references the annotation of the entitytype supplier. The annotation at the navigation property "Supplier" is not referencable. As of today the expression <Path>Supplier@Core.Description#Foo</Path> is not valid.
      <EntityType Name="SalesOrderItem">
      <Key>
      <PropertyRef Name="soi_ID" />
      </Key>
      <Property Type="Edm.String" Name="soi_ID" />
      <NavigationProperty Name="Supplier" Type="X.Supplier">
      <Annotation Term="Core.Description" Qualifier="Foo" String="Item is supplied by" />
      </NavigationProperty>
      </EntityType>

      <EntityType Name="Supplier">
      <Annotation Term="Core.Description" Qualifier="Bar" Path="ID" />
      <Key>
      <PropertyRef Name="ID" />
      </Key>
      <Property Type="Edm.String" Name="ID" />
      </EntityType>

      <Annotations Target="X.SalesOrderItem">
      <Annotation Term="Core.LongDescription" Qualifier="First">
      <Path>Supplier/@Core.Description#Bar</Path>
      </Annotation>
      <Annotation Term="Core.LongDescription" Qualifier="Second">
      <Path>Supplier@Core.Description#Foo</Path>
      </Annotation>
      </Annotations>

      See also Ralf's comment at https://tools.oasis-open.org/issues/browse/ODATA-320

        Attachments

          Activity

            People

            • Assignee:
              martinzurmuehl Martin Zurmuehl
              Reporter:
              martinzurmuehl Martin Zurmuehl
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: