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

Navigation path from instance to lambda operator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: URL Conventions
    • Labels:
      None
    • Environment:

      Proposed

    • Proposal:
      Hide

      The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (:) and a Boolean expression that uses the lambda variable name to refer to properties of members of the the current instance within the collection identified by the navigation path.

      ...

      Other path expressions in the Boolean expression neither prefixed with the lambda variable nor $it are evaluated in the scope of the collection instances at the origin of starting at the instance or collection containing the navigation path that is prepended to the lambda operator or at the current instance within that collection, unless $these is prepended to the lambda operator, when evaluation starts at the current collection.

      Show
      The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (:) and a Boolean expression that uses the lambda variable name to refer to properties of members of the the current instance within the  collection identified by the navigation path. ... Other path expressions in the Boolean expression neither prefixed with the lambda variable nor $it are evaluated in the scope of the collection instances at the origin of starting at the instance or collection containing the navigation path that is prepended to the lambda operator  or at the current instance within that collection, unless $these is prepended to the lambda operator, when evaluation starts at the current collection.

      Description

      The section on lambda operators states:

      Other path expressions in the Boolean expression neither prefixed with the lambda variable nor $it are evaluated in the scope of the collection instances at the origin of the navigation path prepended to the lambda operator.

      But the navigation path does not necessarily originate in a collection, it can also be an instance, for example

      Products('Sugar')?$compute=Sales/any(p:p/Amount lt MinSalesVolume) as LongTail
      

       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: