You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by Carl Mosca <ca...@gmail.com> on 2013/10/01 17:54:58 UTC

adding functions - COMPLEX_TYPE

I am trying to add a function and I not seeing how the
addJPAEdmCompleTypeView method in the JPAEdmComplexType class gets called.
 (BTW, is the name of this method missing an "x" for Complex?)

The logic in the build method of JPAEdmProperty seems to expect and
attributeType of EMBEDDED.

I am wondering if I am misunderstanding how the COMPLEX_TYPE is being used.
 I would like to write a function which returns a COMPLEX_TYPE which is not
part of the model.

Any insights would be appreciated.

TIA,
Carl

Re: adding functions - COMPLEX_TYPE

Posted by Carl Mosca <ca...@gmail.com>.
Hi Chandan,

Very nice explanation.  That's exactly what we need.  I will create a JIRA
issue.

Thank you,
Carl


On Wed, Oct 2, 2013 at 6:32 AM, V.A, Chandan <ch...@sap.com> wrote:

> Hello Carl,
> With the current implementation there is no possibility to extend EDM
> models. However there is an interface
> org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmExtension solely
> created for extending the EDM models generated from JPA models. The
> interface has two methods.
> A) For registering function imports
> B) For extending the EDM models.
>
> A) is implemented in the current version 1.0.0 but B) is yet to be
> implemented (maybe in next release).
>
> With the implementation of B) you could add EDM complex types (Those that
> are not part of JPA meta model) to EDM models and use them as return types
> in Function Import. Please create a JIRA issue for tracking this.
>
> Thanks for pointing out the typo where "x" was missing. We will fix this
> as well in next release.
>
> Thanks,
> Kind Regards
> Chandan VA
>
> -----Original Message-----
> From: Carl Mosca [mailto:carljmosca@gmail.com]
> Sent: Tuesday, October 01, 2013 9:25 PM
> To: dev@olingo.incubator.apache.org
> Subject: adding functions - COMPLEX_TYPE
>
> I am trying to add a function and I not seeing how the
> addJPAEdmCompleTypeView method in the JPAEdmComplexType class gets called.
>  (BTW, is the name of this method missing an "x" for Complex?)
>
> The logic in the build method of JPAEdmProperty seems to expect and
> attributeType of EMBEDDED.
>
> I am wondering if I am misunderstanding how the COMPLEX_TYPE is being used.
>  I would like to write a function which returns a COMPLEX_TYPE which is not
> part of the model.
>
> Any insights would be appreciated.
>
> TIA,
> Carl
>



-- 
Carl J. Mosca

RE: adding functions - COMPLEX_TYPE

Posted by "V.A, Chandan" <ch...@sap.com>.
Hello Carl,
With the current implementation there is no possibility to extend EDM models. However there is an interface org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmExtension solely created for extending the EDM models generated from JPA models. The interface has two methods.
A) For registering function imports
B) For extending the EDM models.

A) is implemented in the current version 1.0.0 but B) is yet to be implemented (maybe in next release).

With the implementation of B) you could add EDM complex types (Those that are not part of JPA meta model) to EDM models and use them as return types in Function Import. Please create a JIRA issue for tracking this.

Thanks for pointing out the typo where "x" was missing. We will fix this as well in next release.

Thanks,
Kind Regards
Chandan VA

-----Original Message-----
From: Carl Mosca [mailto:carljmosca@gmail.com] 
Sent: Tuesday, October 01, 2013 9:25 PM
To: dev@olingo.incubator.apache.org
Subject: adding functions - COMPLEX_TYPE

I am trying to add a function and I not seeing how the
addJPAEdmCompleTypeView method in the JPAEdmComplexType class gets called.
 (BTW, is the name of this method missing an "x" for Complex?)

The logic in the build method of JPAEdmProperty seems to expect and
attributeType of EMBEDDED.

I am wondering if I am misunderstanding how the COMPLEX_TYPE is being used.
 I would like to write a function which returns a COMPLEX_TYPE which is not
part of the model.

Any insights would be appreciated.

TIA,
Carl