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

Annotation/Navigation/Path expressions: allow paths to continue after multi-valued navigation to e.g. drill into complex properties

    XMLWordPrintable

    Details

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

      [Applied]

    • Proposal:
      Hide

      Allow paths to contain an arbitrary number of single- or multi-valued navigation segments at arbitrary positions.

      Change section 14.5.12, second paragraph after bullet list from

      If a path segment is the name of a navigation property that has a cardinality of many, the path MUST
      NOT have any subsequent segments other than type casts, term casts, or a $count segment. If the last
      segment is a $count segment, the path evaluates to the number of related entities.

      to

      If a path segment is the name of a multi-valued structural or navigation property, the path identifies a collection of instances.
      This collection is obtained by evaluating the remaining path for each instance of the collection identified by the path up to the multi-valued property.
      If the remaining path evaluates to a collection of entities, the full path evaluates to the union of these collections.
      If the remaining path evaluates to a collection of primitive or complex type instances, the full path evaluates to the concatenation of these collections.
      If the remaining path evaluates to a single entity, the full path evaluates to the set of these entities.
      If the remaining path evaluates to a single primitive or complex type instance, the full path evaluates to the collection of these instances.

      If the last segment is a $count segment, the path evaluates to the number of instances identified by the preceding path.

      Examples:

      • Path="Items/Product" identifies a collection of products (entities)
      • Path="Items/Product/Supplier/Address" identifies a collection of addresses (complex type instances)
      • Path="Friends/EmailAddresses" identifies a collection of email addresses (strings)

      Provide a similar example for <PropertyPath> traversing a containment relationship.

      Accepted: https://www.oasis-open.org/committees/download.php/50840/odata-meeting-53_on-20130926-minutes.html#odata-481

      Show
      Allow paths to contain an arbitrary number of single- or multi-valued navigation segments at arbitrary positions. Change section 14.5.12, second paragraph after bullet list from If a path segment is the name of a navigation property that has a cardinality of many, the path MUST NOT have any subsequent segments other than type casts, term casts, or a $count segment. If the last segment is a $count segment, the path evaluates to the number of related entities. to If a path segment is the name of a multi-valued structural or navigation property, the path identifies a collection of instances. This collection is obtained by evaluating the remaining path for each instance of the collection identified by the path up to the multi-valued property. If the remaining path evaluates to a collection of entities, the full path evaluates to the union of these collections. If the remaining path evaluates to a collection of primitive or complex type instances, the full path evaluates to the concatenation of these collections. If the remaining path evaluates to a single entity, the full path evaluates to the set of these entities. If the remaining path evaluates to a single primitive or complex type instance, the full path evaluates to the collection of these instances. If the last segment is a $count segment, the path evaluates to the number of instances identified by the preceding path. Examples: Path="Items/Product" identifies a collection of products (entities) Path="Items/Product/Supplier/Address" identifies a collection of addresses (complex type instances) Path="Friends/EmailAddresses" identifies a collection of email addresses (strings) Provide a similar example for <PropertyPath> traversing a containment relationship. Accepted: https://www.oasis-open.org/committees/download.php/50840/odata-meeting-53_on-20130926-minutes.html#odata-481
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/50848/odata-v4.0-wd04-part3-csdl-2013-09-27.docx Applied: https://www.oasis-open.org/committees/download.php/50877/odata-meeting-54_on-20131001-minutes.html#ga_01

      Description

      CSDL 14.5.12 restricts path expressions to contain at most one multi-valued navigation property which can only be followed by a single type cast or term cast.

      This is overly restrictive: drilling into a complex type path after a navigation is straight-forward, and even multiple multi-valued navigations could be resolved by building the union of all targeted collections.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: