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

    XMLWordPrintable

    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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: