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] Commented: (ODATA-528) $entity should require cast segment in order to apply $select/$expand


    [ http://tools.oasis-open.org/issues/browse/ODATA-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34782#action_34782 ] 

Michael Pizzo commented on ODATA-528:
-------------------------------------

Yes, you need to use a cast to specify the subtype on which the derived property exists. This has been the rule since we added select/relationships on derived types in V3.

I don't mind the abnf just putting the optional qualifiedEntityTypeName and calling out in prose that it's required for $select/$expand, but since there has been confusion I'm also okay spelling it out.


> $entity should require cast segment in order to apply $select/$expand
> ---------------------------------------------------------------------
>
>                 Key: ODATA-528
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-528
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData ABNF Construction Rules, OData Protocol 
>    Affects Versions: V4.0_CS01
>         Environment: [Proposed]
>            Reporter: Michael Pizzo
>             Fix For: V4.0_CSD03
>
>
> Given an opaque id for an entity, the client can get the instance using the new /$entity resource and providing the id through the $id query option, such as:
> http://host.service/$entity?$id=urn:mysvc5304-98001-7832-4425
> This can be cast to a particular type:
> http://host.service/$entity/myservice.Customer?$id=urn:mysvc5304-98001-7832-4425
> And any of the query options supported for a single resource can be applied:
> http://host.service/$entity/myservice.Customer?$id=urn:mysvc5304-98001-7832-4425?$select=LastName&$expand=Orders
> However the text current does no require the cast in order to apply $select and $expand. This is a bug, because without the cast a parser cannot determine whether the $select and $expand are valid without actually retrieving the object and discovering its type.
> Everywhere else we consistently require casting to the correct type in order to access members of that type.
> Also, I think there is a bug in the ABNF as it doesn't appear to allow for the cast segment:
> '$entity' "?" entityOptions  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


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