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

Add to depth restrictions to Capabilities Vocabulary

    Details

    • Proposal:
      Hide

      Add MaxLevels property to FilterRestrictionsType, ExpandRestrictionsType, InsertRestrictionsType, UpdateRestrictionsType and DeleteRestrictionsType

      <ComplexType Name="FilterRestrictionsType">
      ...
      <Property Name=MaxLevels" Type="Edm.Int32" DefaultValue="-1">
      <Annotation Term="Core.Description" String="The maximum number
      of levels (including recursion) that can be traversed in a $filter
      expression. A value of -1 indicates there is no restriction"/>
      </Property>
      </ComplexType>

      <ComplexType Name="ExpandRestrictionsType">
      ...
      <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1">
      <Annotation Term="Core.Description" String="The maximum number
      of levels that can be can be expanded in a $expand expression.
      A value of -1 indicates there is no restriction"/>
      </Property>
      </ComplexType>

      <ComplexType Name="InsertRestrictionsType">
      ...
      <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1">
      <Annotation Term="Core.Description" String="The maximum number
      of navigation properties that can be traversed when addressing
      the collection to insert into. A value of -1 indicates there is no
      restriction"/>
      </Property>
      </ComplexType>

      <ComplexType Name="UpdateRestrictionsType">
      ...
      <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1">
      <Annotation Term="Core.Description" String="The maximum number
      of navigation properties that can be traversed when addressing
      the collection or entity to update. A value of -1 indicates there is no
      restriction"/>
      </Property>
      </ComplexType>

      <ComplexType Name="DeleteRestrictionsType">
      ...
      <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1">
      <Annotation Term="Core.Description" String="The maximum number of
      navigation properties that can be traversed when addressing the
      collection to delete from or the entity to delete. A value of -1
      indicates there is no restriction"/>
      </Property>
      </ComplexType>

      Show
      Add MaxLevels property to FilterRestrictionsType, ExpandRestrictionsType, InsertRestrictionsType, UpdateRestrictionsType and DeleteRestrictionsType <ComplexType Name="FilterRestrictionsType"> ... <Property Name=MaxLevels" Type="Edm.Int32" DefaultValue="-1"> <Annotation Term="Core.Description" String="The maximum number of levels (including recursion) that can be traversed in a $filter expression. A value of -1 indicates there is no restriction"/> </Property> </ComplexType> <ComplexType Name="ExpandRestrictionsType"> ... <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1"> <Annotation Term="Core.Description" String="The maximum number of levels that can be can be expanded in a $expand expression. A value of -1 indicates there is no restriction"/> </Property> </ComplexType> <ComplexType Name="InsertRestrictionsType"> ... <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1"> <Annotation Term="Core.Description" String="The maximum number of navigation properties that can be traversed when addressing the collection to insert into. A value of -1 indicates there is no restriction"/> </Property> </ComplexType> <ComplexType Name="UpdateRestrictionsType"> ... <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1"> <Annotation Term="Core.Description" String="The maximum number of navigation properties that can be traversed when addressing the collection or entity to update. A value of -1 indicates there is no restriction"/> </Property> </ComplexType> <ComplexType Name="DeleteRestrictionsType"> ... <Property Name="MaxLevels" Type="Edm.Int32" DefaultValue="-1"> <Annotation Term="Core.Description" String="The maximum number of navigation properties that can be traversed when addressing the collection to delete from or the entity to delete. A value of -1 indicates there is no restriction"/> </Property> </ComplexType>
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-vocabularies/commit/3c85b3a5aaaca89e9c12fd46c53ce306b12b0a29

      Description

      Services will likely have different limits in the number of levels of depth they support in queries. For example:

      • Filter on far navigation (e.g. Manager/Manager/Title eq ‘Director’ )
      • Nested Any (e.g. Reports/any(Reports: Reports/any … )
      • Deep expansion 1:M (e.g. $expand=Reports, Reports/Reports)

      All those filters are syntactically correct, but create undue server-side load, so services are likely to impose limits on the number of levels of depth for such expressions.

      Is this something services should be able to report in Capabilities?

        Attachments

          Activity

          Hide
          mark.biamonte Mark Biamonte (Inactive) added a comment -

          From discussions in the TC call 2016-08-04, in addition to the filter restriction mentioned in the description, there are implementations that impose restrictions to:

          1) the number of navigation properties that can be traversed when addressing the collection to create an entity in.
          2) the number of levels that can be expanded in a $expand expression.

          Show
          mark.biamonte Mark Biamonte (Inactive) added a comment - From discussions in the TC call 2016-08-04, in addition to the filter restriction mentioned in the description, there are implementations that impose restrictions to: 1) the number of navigation properties that can be traversed when addressing the collection to create an entity in. 2) the number of levels that can be expanded in a $expand expression.
          Hide
          handl Ralf Handl added a comment -

          Do we want to distinguish between -1 for "no restriction" and null for "no static restriction"?

          Show
          handl Ralf Handl added a comment - Do we want to distinguish between -1 for "no restriction" and null for "no static restriction"?
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Resolved as proposed 2017-3-16

          Show
          mikep Michael Pizzo (Inactive) added a comment - Resolved as proposed 2017-3-16
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Application approved 2017-6-8.

          Show
          mikep Michael Pizzo (Inactive) added a comment - Application approved 2017-6-8.

            People

            • Assignee:
              mark.biamonte Mark Biamonte (Inactive)
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: