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

Allow key expressions in Path constructs within annotations

    XMLWordPrintable

    Details

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

      Applied

    • Proposal:
      Hide

      Path expressions allow key segments in parenthesis syntax after path segments that identify a collection of entities. The key values can be literals, using the same style as URL literals, or they can be path expressions, evaluated according to the rules of path expressions.

      This key syntax can only be used in Path expressions as only these refer to instance values.

      It cannot be used in expressions for model references, i.e. PropertyPath, NavigationPropertyPath, AnnotationPath, and their abstract supertypes AnyPropertyPath and AnyPath.

      Show
      Path expressions allow key segments in parenthesis syntax after path segments that identify a collection of entities. The key values can be literals, using the same style as URL literals, or they can be path expressions, evaluated according to the rules of path expressions. This key syntax can only be used in Path expressions as only these refer to instance values. It cannot be used in expressions for model references, i.e. PropertyPath, NavigationPropertyPath, AnnotationPath, and their abstract supertypes AnyPropertyPath and AnyPath.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/60500/odata-csdl-json-v4.01-wd01-2017-04-10.docx https://www.oasis-open.org/committees/download.php/60499/odata-csdl-xml-v4.01-wd02-2017-04-10.docx https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/4.01%20spec/schemas/edm.xsd?op=diff&rev=1031

      Description

      With ODATA-960 we added absolute paths to the Path syntax, which allows referencing properties of a singleton, e.g.

      <Annotation Term="Display.visible" Path="/this.container/Settings/FeatureXxxIsAvailable" />

      A logical extension is allowing key expressions to reference entities and their properties within an entity set:

      <Annotation Term="Display.visible" Path="/this.container/SettingsCollection('FeatureXxx')/IsAvailable" />

      In addition to literal values the key values can be provided using path expressions. This enables (a third party) to address content where the service author forgot to define a navigation path:

      <Annotation Term="Display.title" Path="/this.container/Products(ID=ProductID)/Name" />

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              handl Ralf Handl
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: