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

$inlinecount and $count, do we need both? Could we use $count in select clause as well?

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: ABNF, Protocol
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      see also ODATA-323

      • allowing /$count to be appended to any property representing a collection (of primitive, complex or entity type) in the $expand clause resulting in the count of the property being returned
        -In Atom, support the metadata:count element as a direct child of a navigation link for getting just the count of related entities
      Show
      see also ODATA-323 allowing /$count to be appended to any property representing a collection (of primitive, complex or entity type) in the $expand clause resulting in the count of the property being returned -In Atom, support the metadata:count element as a direct child of a navigation link for getting just the count of related entities
    • Resolution:
      Show
      Accepted: https://www.oasis-open.org/committees/download.php/49055/odata-meeting-35_on-20130502-minutes.html#odata-339

      Description

      In numerous cases one might want to just know, or also know, the count of the number of entities in a collection identified by a navigation property as opposed to retrieving the whole set. We allow already for $count to be appended to a resource path identifying a set. As of V4 we can now also nest the $inlinecount query option in the $expand to retrieve the count for that set after, also new, optionally applying a filter to that set. I can see cases were you would only want to retrieve the count without actually expanding such a navigation property. So I was wondering if we could allow the use of $count in a select to express the fact that the odata.count annotation for such navigation property ought to be included in the response and at the same time, while expanding, wouldn't want to use $count instead of $inlinecount in the expansion as well, thereby getting rid of the requirement for a special $inlinecount altogether.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              hubert.heijkers Hubert Heijkers (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: