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

Allow numeric indexes in Path constructs within annotations

    XMLWordPrintable

    Details

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

      Applied

    • Proposal:
      Hide

      Path expressions allow index segments after path segments that identify an ordered collection of primitive or complex types. The index is zero-based and MUST be an integer literal. Negative integers count from the end of the collection, with -1 representing the last item in the collection.

      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 index segments after path segments that identify an ordered collection of primitive or complex types. The index is zero-based and MUST be an integer literal. Negative integers count from the end of the collection, with -1 representing the last item in the collection. 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://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/4.01%20spec/schemas/edm.xsd?op=diff&rev=1031 https://github.com/oasis-tcs/odata-csdl-schemas/pull/1 https://www.oasis-open.org/committees/download.php/64129/odata-csdl-json-v4.01-wd05-2018-10-22.docx   https://www.oasis-open.org/committees/download.php/64130/odata-csdl-xml-v4.01-wd06-2018-10-22.docx  

      Description

      With ODATA-1061 we allowed key segments in parenthesis syntax after path segments that identify a collection of entities.

      A logical extension is allowing numeric indexes to reference entities or complex type instances within a collection:

      <Annotation Term="Some.Term" Path="ComplexCollection/0/SomeProperty" />
      

      This would address the first item in the collection. If the item is structured, additional path segments can follow after the index segment.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: