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-68) Describe representation of ReferenceTypes in responses

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

Ralf Handl commented on ODATA-68:

That makes sense, hadn't thought of this. 

Do we keep the "KEY(...)" notation for URLs? 

Currently references are passed as input parameters like this:

    GET ~/ProductsByCustomerRef()?customer=KEY(Customers(1))

    GET ~/ProductsByMultipleCustomerRefs()?customers=["KEY(Customers(1))","KEY(Customers(1))"]

Note the double-quotes to make the array a true JSON array.

We could switch to the JSON representation of entity references, and use relative URLs:

    GET ~/ProductsByCustomerRef()?customer={"odata.entityRef":"Customers(1)"}

    GET ~/ProductsByMultipleCustomerRefs()?customers=[{"odata.entityRef":"Customers(1)"},{"odata.EntityRef":"Customers(1)"}]

I always wondered why the keyword for references is KEY and not REF.

> Describe representation of ReferenceTypes in responses
> ------------------------------------------------------
>                 Key: ODATA-68
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-68
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData ATOM Format v1.0, OData JSON Format v1.0
>    Affects Versions: WD01
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>             Fix For: WD01
> ReferenceType elements define a type derived from an entity type that can be used in function import return types. 
> Describe how they are serialized in Atom and JSON.

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]