[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Commented: (ODATA-36) Make $expand implicit if navigation properties are mentioned in $select or $aggregate
[ http://tools.oasis-open.org/issues/browse/ODATA-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31266#action_31266 ] Ralf Handl commented on ODATA-36: --------------------------------- Actually both $select and $expand have to be considered when translating an OData query into a SQL query: - if only $expand, use SELECT * and join along the expanded navigation properties - if only $select, translate $select into SELECT... - if both,translate $expand into the join and $select into SELECT... - if $filter contains navigations not mentioned in $expand, add them to the join - ... Dropping $expand altogether and e.g. redefining $select=path/* to mean the same as the then obsoleted $expand=path would actually simplify the translation into SQL, and at the same time reduce the number of malformed OData queries: all the current ones where people got the double-entry book-keeping exercise of "add to $select, and also add to $expand" wrong. > Make $expand implicit if navigation properties are mentioned in $select or $aggregate > ------------------------------------------------------------------------------------- > > Key: ODATA-36 > URL: http://tools.oasis-open.org/issues/browse/ODATA-36 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Improvement > Components: OData Protocol v1.0, OData URL Conventions v1.0 > Affects Versions: WD01 > Environment: [Proposed] > Reporter: Martin Zurmuehl > Priority: Minor > Fix For: WD01 > > > Currently clients need to repeat themselves when projecting on expanded entities: > GET http://services.odata.org/OData/OData.svc/Products?$select=*,Category/Name&$expand=Category > This could be reduced to > GET http://services.odata.org/OData/OData.svc/Products?$select=*,Category/Name > because the client explicitly requests Category/Name, and the server can only satisfy that if it expands the Category. -- 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]