OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1416) Dynamic capabilities for containment cases


Ralf Handl created ODATA-1416:
---------------------------------

             Summary: Dynamic capabilities for containment cases
                 Key: ODATA-1416
                 URL: https://issues.oasis-open.org/browse/ODATA-1416
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Improvement
          Components: CSDL JSON , CSDL XML, Vocabularies
    Affects Versions: V4.01_OS
            Reporter: Ralf Handl


Capabilities are annotated on entity sets, and for "nested" / contained entities they are expressed via Capabilities.NavigationRestrictions.

This works fine for static capabilities (can't ever update, can't ever delete), but does not allow expressing dynamic capabilities via boolean properties on the nested entities.

Example:
* {{Orders}} have (contained) {{items}}
* Each {{Item}} has a property {{isUpdatable}}

The corresponding navigation restriction is (rather bulky):

{code:xml}
<Annotations Target="MyService.EntityContainer/Orders">
  <Annotation Term="Capabilities.NavigationRestrictions">
    <Record Type="Capabilities.NavigationRestrictionsType">
      <PropertyValue Property="RestrictedProperties">
        <Collection>
          <Record Type="Capabilities.NavigationPropertyRestriction">
            <PropertyValue Property="NavigationProperty" NavigationPropertyPath="items"/>
            <PropertyValue Property="UpdateRestrictions">
              <Record Type="Capabilities.UpdateRestrictionsType">
                <PropertyValue Property="Updatable" Path="isUpdatable"/>
              </Record>
            </PropertyValue>
          </Record>
        </Collection>
      </PropertyValue>
    </Record>
  </Annotation>
</Annotations>
{code}

Unfortunately the above annotation is wrong, because

bq. For annotations embedded within or targeting an entity set or a singleton, the path is evaluated starting at the entity set or singleton, i.e. an empty path resolves to the entity set or singleton, and non-empty paths MUST follow the rules for annotations targeting the declared entity type of the entity set or singleton.



--
This message was sent by Atlassian Jira
(v8.3.3#803004)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]