[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Commented: (ODATA-374) Returning heterogeneous types for a function call
[ http://tools.oasis-open.org/issues/browse/ODATA-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33319#action_33319 ] Ralf Handl commented on ODATA-374: ---------------------------------- This is already possible using the built-in abstract type Edm.EntityType: <Function Name="CreatedEntities" ReturnType="Collection(Edm.EntityType)"> <Parameter Name="before" Type="Edm.DateTimeOffset" Nullable="true" /> <Parameter Name="after" Type="Edm.DateTimeOffset" Nullable="true" /> </Function> To call this function at the service root you add a function import to your default entity container <FunctionImport Name="CreatedEntities" Function="Model.CreatedEntities" /> Stylistic side-note: I named the function (import) using a noun because calling it will provide the verb: GET ~/CreatedEntities?after=datetimeoffset'2013-05-07T11:03Z' Please close this issue if you are satisfied with this answer. > Returning heterogeneous types for a function call > ------------------------------------------------- > > Key: ODATA-374 > URL: http://tools.oasis-open.org/issues/browse/ODATA-374 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: New Feature > Components: OData CSDL, OData Protocol > Reporter: Anila Kumar GVN > > It is not clear if OData enables a service to return a collection of heterogenous entity/complex types as a response to a function call. > I want to return a collection of types in response to a function call but each of the items in the collection could belong to different entity types. > Example: > /OData.svc/GetCreatedEntities?before=xxxx-xx-xx&after=xxxx-xx-xx > here GetCreatedEntities is a function call on my product that return a collection of entities that are Created in a given time period. Return Type is a Collection Type that could contain a Customer type, Order type etc. > Is it supported in OData? -- 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]