[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=33518#action_33518 ] Ralf Handl commented on ODATA-374: ---------------------------------- If these four entity types have a common base type, then you can use that base type instead of Edm.EntityType. Another possibility would be to invent a term in a special vocabulary, e.g. com.ca.vocabs.SomeVoc: <Term Name="PossibleEntityTypes" Type="Collection(Edm.String) AppliesTo="EntitySet"/> and annotate your function return type: <Function...> ... <ReturnType Type="Collection(Edm.EntityType)> <Annotation Term="com.ca.vocabs.SomeVoc.PossibleEntityTypes"> <Collection> <String>MyModel.Person</String> <String>MyModel.Location</String> <String>MyModel.Group</String> <String>MyModel.Role</String> ... </Collection> </Annotation> </ReturnType> </Function> > 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 > Affects Versions: V4.0_WD01 > Environment: [Proposed] > Reporter: Anila Kumar GVN > Assignee: Anila Kumar GVN > Fix For: V4.0_WD01 > > > 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]