You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2015/05/18 13:48:59 UTC
[jira] [Resolved] (OLINGO-629) No support for ENTITY for
EdmMultiplicity.MANY in FunctionImport
[ https://issues.apache.org/jira/browse/OLINGO-629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Amend resolved OLINGO-629.
------------------------------------
Resolution: Won't Fix
Fix Version/s: V2 2.0.4
Hi Alex,
I assume this is completed. If not please reopen.
Best Regards,
Christian
> No support for ENTITY for EdmMultiplicity.MANY in FunctionImport
> ----------------------------------------------------------------
>
> Key: OLINGO-629
> URL: https://issues.apache.org/jira/browse/OLINGO-629
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.3
> Reporter: Alex
> Assignee: Christian Amend
> Priority: Blocker
> Fix For: V2 2.0.4
>
>
> We have a client that consumes OData by calling functions like search() that should return a list of entities
> <FunctionImport Name="Search" ReturnType="Collection(Feed.Bundle)" EntitySet="Bundles" m:HttpMethod="GET">
> <Parameter Name="searchTerm" Type="Edm.String"/>
> </FunctionImport>
> the FunctionImport declared as
> List<FunctionImportParameter> parameters = new ArrayList<>();
> parameters.add(new FunctionImportParameter().setName("searchTerm").setType(EdmSimpleTypeKind.String));
> return new FunctionImport().setName(name)
> .setParameters(parameters)
> .setReturnType(new ReturnType().setTypeName(ENTITY_TYPE_FEED_BUNDLE).setMultiplicity(EdmMultiplicity.MANY))
> .setEntitySet(ENTITY_SET_NAME_BUNDLES)
> .setHttpMethod(ODataHttpMethod.GET.name());
> When I do EntityProvider.writeFunctionImport(... i got exception that Array cannot be converted to Map.
> I looked through the code and there are no support for serializing entities in function import
> https://github.com/apache/olingo-odata2/blob/6fd6f064d5d8ed97cd914b1378e988655270533a/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/AtomEntityProvider.java#L343
> by the way, other code rely on that feature, for example
> https://github.com/apache/olingo-odata2/blob/2636dd5f79186003b9d1087ed03586efd7687f24/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAResponseBuilderDefault.java#L317
> it won't work
> Is that expected behavior or just not implemented yet?
> the client uses MS implementation of OData maybe returning entities is not a standard feature but anyway jpa builder will fail too
> please advise any solutions (i also consider to write servlet filter and process function imports manually..)
> thanks,
> alex
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)