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] Updated: (ODATA-340) How to retrieve both the entity references as well as the count of a collection referenced by a navigation property?

     [ http://tools.oasis-open.org/issues/browse/ODATA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-340:

Yes, we added it with ODATA-276:

    Customers?$expand=Orders/$ref <=get customers and the refs for their orders 
    Customers?$expand=Orders($filter=Amount>100)/$ref <=get customers and the ref for orders over $100 

So we can already do 


and receive inlined feeds of entity references which also contain an odata.count annotation or <metadata:count> element, depending on the format.

The syntax above might change due to ODATA-323 and ODATA-345.

So I propose to close this ticket without action.

> How to retrieve both the entity references as well as the count of a collection referenced by a navigation property?
> --------------------------------------------------------------------------------------------------------------------
>                 Key: ODATA-340
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-340
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData Protocol 
>            Reporter: Hubert Heijkers
> Currently if we want to retrieve the references to the individual entities instead of inlining the entities themselves the $expand syntax allows us to append /$ref to the navigation property that represents that collection of entities. If we wanted the size of that collection, after optionally applying any filters that might have been specified for such collection, one would need to add the $inlinecount ($count if ODATA-339 gets accepted) to be included as one of the expand options. This leads to the question how one could get both the count as well as the references to the individual entities as well as, come to think about it, how one could specify the order in which these references ought to be returned.
> In ODATA-339 the proposal is to allow /$count to be appended to a property in the select clause if one wanted to retrieve just the count. I was wondering if $ref should be moved to the select clause as well where $ref became just one of those special properties allowed to be used as appended to a navigation property or in a select nested within an expand were $ref would just be this 'special' property that would result in the reference to be injected in the projection and were it might optionally be combined with other properties (if that made sense)???
> I.e. these would then all be valid:
> http://host/service.svr/Customers?$select=Orders/$ref
> http://host/service.svr/Customers?$select=Orders/$count 
> http://host/service.svr/Customers?$select=Orders/($select=$ref)
> http://host/service.svr/Customers?$select=Orders/($count,$select=$ref,$filter=Amount gt 100)
> http://host/service.svr/Customers?$select=Orders/($select=$ref,$orderby=OrderID)

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]