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

Add CollectionPropertyRestrictions capability term

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02, V4.0_CSD02
    • Component/s: Vocabularies
    • Labels:
      None
    • Proposal:
      Hide

      1) Remove "Collection" in AppliesTo in our capabilities vocabulary.
      2) Add a new term, "CollectionPropertyRestrictions", that can be applied to collection-valued structural properties to describe support for new filter/sort/page type functionality:

      <Term Name="CollectionPropertyRestrictions" Type="Collection(Capabilities.CollectionPropertyRestrictionsType)" AppliesTo="EntitySet">
      <Annotation Term="Core.Description" String="Describes restrictions on operations applied to collection-valued structural properties" />
      </Term>
      <ComplexType Name="CollectionPropertyRestrictionsType">
      <Property Name="CollectionProperty" Type="Edm.PropertyPath">
      <Annotation Term="Core.Description" String="Restricted Collection-valued property" />
      </Property>
      <Property Name="FilterFunctions" Type="Collection(Edm.String)">
      <Annotation Term="Core.Description"
      String="List of functions and operators supported in $filter. If null, all functions and operators may be attempted" />
      </Property>
      <Property Name="FilterRestrictions" type ="Capabilities.FilterRestrictionsType">
      <Annotation Term="Core.Description" String="Restrictions on $filter expressions" />
      </Property>
      <Property Name="SearchRestrictions" Type="Capabilities.SearchRestrictionsType">
      <Annotation Term="Core.Description" String="Restrictions on $search expressions" />
      </Property>
      <Property Name="SortRestrictions" type ="Capabilities.SortRestrictionsType">
      <Annotation Term="Core.Description" String="Restrictions on $orderby expressions" />
      </Property>
      <Property Name="TopSupported" Type="Core.Tag" DefaultValue="true">
      <Annotation Term="Core.Description" String="Supports $top" />
      </Property>
      <Property Name="SkipSupported" Type="Core.Tag" DefaultValue="true">
      <Annotation Term="Core.Description" String="Supports $skip" />
      </Property>
      <Property Name="Insertable" Type="Edm.Boolean" DefaultValue="true">
      <Annotation Term="Core.Description" String="This collection supports inserts" />
      </Property>
      <Property Name="Updatable" Type="Edm.Boolean" DefaultValue="true">
      <Annotation Term="Core.Description" String="Members of this ordered collection can be updated by ordinal" />
      </Property>
      <Property Name="Deletable" Type="Edm.Boolean" DefaultValue="true">
      <Annotation Term="Core.Description" String="Members of this ordered collection can be deleted by ordinal" />
      </Property>
      </ComplexType>

      Show
      1) Remove "Collection" in AppliesTo in our capabilities vocabulary. 2) Add a new term, "CollectionPropertyRestrictions", that can be applied to collection-valued structural properties to describe support for new filter/sort/page type functionality: <Term Name="CollectionPropertyRestrictions" Type="Collection(Capabilities.CollectionPropertyRestrictionsType)" AppliesTo="EntitySet"> <Annotation Term="Core.Description" String="Describes restrictions on operations applied to collection-valued structural properties" /> </Term> <ComplexType Name="CollectionPropertyRestrictionsType"> <Property Name="CollectionProperty" Type="Edm.PropertyPath"> <Annotation Term="Core.Description" String="Restricted Collection-valued property" /> </Property> <Property Name="FilterFunctions" Type="Collection(Edm.String)"> <Annotation Term="Core.Description" String="List of functions and operators supported in $filter. If null, all functions and operators may be attempted" /> </Property> <Property Name="FilterRestrictions" type ="Capabilities.FilterRestrictionsType"> <Annotation Term="Core.Description" String="Restrictions on $filter expressions" /> </Property> <Property Name="SearchRestrictions" Type="Capabilities.SearchRestrictionsType"> <Annotation Term="Core.Description" String="Restrictions on $search expressions" /> </Property> <Property Name="SortRestrictions" type ="Capabilities.SortRestrictionsType"> <Annotation Term="Core.Description" String="Restrictions on $orderby expressions" /> </Property> <Property Name="TopSupported" Type="Core.Tag" DefaultValue="true"> <Annotation Term="Core.Description" String="Supports $top" /> </Property> <Property Name="SkipSupported" Type="Core.Tag" DefaultValue="true"> <Annotation Term="Core.Description" String="Supports $skip" /> </Property> <Property Name="Insertable" Type="Edm.Boolean" DefaultValue="true"> <Annotation Term="Core.Description" String="This collection supports inserts" /> </Property> <Property Name="Updatable" Type="Edm.Boolean" DefaultValue="true"> <Annotation Term="Core.Description" String="Members of this ordered collection can be updated by ordinal" /> </Property> <Property Name="Deletable" Type="Edm.Boolean" DefaultValue="true"> <Annotation Term="Core.Description" String="Members of this ordered collection can be deleted by ordinal" /> </Property> </ComplexType>
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-vocabularies/commit/fec6668c16245ac09c64afb8de5568fa5ce3ce29

      Description

      In ODATA-545 we added the value "Collection" as a valid value for AppliesTo to specify that a term can target any collection. At the time we said that it should only be returned for 4.01 or greater clients. We said that, for 4.0 clients, we could just say "EntitySet Property NavigationProperty" and underspecify the restriction (i.e., it would only apply to collection-valued (nav) properties) but that would be implied by the semantics of the term.

      Then, in ODATA-631, we used the new term in our vocabularies for things like CountRestrictions, FilterRestrictions,TopSupported,SKipSupported, etc. This is problematic, as we didn't want to return this to 4.0 clients, yet we only have one version of the vocabulary.

      It also violates our best practice of applying annotation in the container, in order to support type-reuse, rather than annotate the type directly.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: