You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Luca Vercelli <l....@finsoft.it> on 2017/12/18 13:32:16 UTC

Olingo and JPA

Dear all,

I am new to Olingo.

I have a working JPA project, with database, entites and all. I would 
like to expose some entities to clients via OData.

I have found an interesting class in "Java V2" section:

org.apache.olingo.odata2.processor.jpa.ODataJPAContext

However, I cannot find any such class in "Java V4" section. Is that part 
of project abandoned? Should I switch to OData V2?

Thank you.


-- 
Luca Vercelli

Finsoft srl
C.so Svizzera 185/bis
10149 Torino

Mail: l.vercelli@finsoft.it


Re: Olingo and JPA

Posted by Ramesh Reddy <ra...@redhat.com>.
Luca,

I also recommend taking look at  Open Source project called Teiid
http://teiid.org, where we have implemented the ODATA V4 interface using
the Olingo libraries. There are couple different ways you can expose your
database as ODATA API using Teiid. But for your use case, I suggest taking
a look at this example [1] which uses Spring Boot and Teiid and exposes
your JPA entities over OData. Teiid does a lot more than OData API but this
is a small feature that can be also used independently.

1) Yes, we have been using Olingo in production.
2 &3) They are not removed, they were never part of it. Olingo is an
implementation of OData specification. The specification does NOT go into
any direct mapping of JPA to OData, it is up to the user how they interpret
the entities between two worlds. OData is generic data access API that is
not tied to the RDBMS world as JPA does thus the differences. Some of the
nomenclatures are same but that is where they end.

Can one write a JPA layer as Olingo V2 did? absolutely. I know there have
been efforts before, but I am not sure about completeness as they are not
tracked as part of Olingo project. We like to strictly adhere to the
implementation of spec, and sister projects can provide additional
extensions like JPA.

Teiid in a way tries to bring these two worlds somewhat together. Shameless
plug, I am one of the developers on Teiid and as well as a committer on
Olingo project.

Ramesh..

[1]
https://github.com/teiid/teiid-spring-boot/blob/master/samples/odata/Readme.adoc

On Thu, Dec 28, 2017 at 3:43 AM, Luca Vercelli <l....@finsoft.it>
wrote:

> Ok, I have tried that project, it works enough, however it doesn't seem to
> be ready for production.
>
> So, I have a pair of gerneral questions about Olingo:
>
> (1) The versione 4 is considered ready for production, or is it in
> development yet?
>
> (2) Why the "JPA" and "annotations" processors were removed? Isn't the
> community interested in them?
>
> (3) Even a more general question. Why Olingo developers decided to use
> their own notion of "Entity" instead of using something already existing?
> E.g. javax.persistence.Entity or javax.xml.bind.annotation.XmlRootElement?
> That gives the developer a great work to do, every time he has to develop a
> new service.
>
> Thank you.
>
> Luca
>
>
>
>
> Il 18/12/2017 16:02, Luca Vercelli ha scritto:
>
>> Thank you very much, I'll check it out.
>>
>>
>> Il 18/12/2017 15:53, Grande, Oliver ha scritto:
>>
>>> Hello Luca,
>>>
>>> you can find an open source project, which is currently under
>>> development, at https://github.com/SAP/olingo-jpa-processor-v4.
>>>
>>> Regards,
>>> Oliver
>>>
>>>
>>> -----Original Message-----
>>> From: Luca Vercelli [mailto:l.vercelli@finsoft.it]
>>> Sent: Montag, 18. Dezember 2017 14:32
>>> To: user@olingo.apache.org
>>> Subject: Olingo and JPA
>>>
>>> Dear all,
>>>
>>> I am new to Olingo.
>>>
>>> I have a working JPA project, with database, entites and all. I would
>>> like to expose some entities to clients via OData.
>>>
>>> I have found an interesting class in "Java V2" section:
>>>
>>> org.apache.olingo.odata2.processor.jpa.ODataJPAContext
>>>
>>> However, I cannot find any such class in "Java V4" section. Is that part
>>> of project abandoned? Should I switch to OData V2?
>>>
>>> Thank you.
>>>
>>>
>>>
>>
> --
> Luca Vercelli
>
> Finsoft srl
> C.so Svizzera 185/bis
> 10149 Torino
>
> Mail: l.vercelli@finsoft.it
>
>

Re: Olingo and JPA

Posted by Luca Vercelli <l....@finsoft.it>.
Ok, I have tried that project, it works enough, however it doesn't seem 
to be ready for production.

So, I have a pair of gerneral questions about Olingo:

(1) The versione 4 is considered ready for production, or is it in 
development yet?

(2) Why the "JPA" and "annotations" processors were removed? Isn't the 
community interested in them?

(3) Even a more general question. Why Olingo developers decided to use 
their own notion of "Entity" instead of using something already 
existing? E.g. javax.persistence.Entity or 
javax.xml.bind.annotation.XmlRootElement? That gives the developer a 
great work to do, every time he has to develop a new service.

Thank you.

Luca



Il 18/12/2017 16:02, Luca Vercelli ha scritto:
> Thank you very much, I'll check it out.
>
>
> Il 18/12/2017 15:53, Grande, Oliver ha scritto:
>> Hello Luca,
>>
>> you can find an open source project, which is currently under 
>> development, at https://github.com/SAP/olingo-jpa-processor-v4.
>>
>> Regards,
>> Oliver
>>
>>
>> -----Original Message-----
>> From: Luca Vercelli [mailto:l.vercelli@finsoft.it]
>> Sent: Montag, 18. Dezember 2017 14:32
>> To: user@olingo.apache.org
>> Subject: Olingo and JPA
>>
>> Dear all,
>>
>> I am new to Olingo.
>>
>> I have a working JPA project, with database, entites and all. I would
>> like to expose some entities to clients via OData.
>>
>> I have found an interesting class in "Java V2" section:
>>
>> org.apache.olingo.odata2.processor.jpa.ODataJPAContext
>>
>> However, I cannot find any such class in "Java V4" section. Is that part
>> of project abandoned? Should I switch to OData V2?
>>
>> Thank you.
>>
>>
>

-- 
Luca Vercelli

Finsoft srl
C.so Svizzera 185/bis
10149 Torino

Mail: l.vercelli@finsoft.it


Re: Olingo and JPA

Posted by Luca Vercelli <l....@finsoft.it>.
Thank you very much, I'll check it out.


Il 18/12/2017 15:53, Grande, Oliver ha scritto:
> Hello Luca,
>
> you can find an open source project, which is currently under development, at https://github.com/SAP/olingo-jpa-processor-v4.
>
> Regards,
> Oliver
>
>
> -----Original Message-----
> From: Luca Vercelli [mailto:l.vercelli@finsoft.it]
> Sent: Montag, 18. Dezember 2017 14:32
> To: user@olingo.apache.org
> Subject: Olingo and JPA
>
> Dear all,
>
> I am new to Olingo.
>
> I have a working JPA project, with database, entites and all. I would
> like to expose some entities to clients via OData.
>
> I have found an interesting class in "Java V2" section:
>
> org.apache.olingo.odata2.processor.jpa.ODataJPAContext
>
> However, I cannot find any such class in "Java V4" section. Is that part
> of project abandoned? Should I switch to OData V2?
>
> Thank you.
>
>

-- 
Luca Vercelli

Finsoft srl
C.so Svizzera 185/bis
10149 Torino

Mail: l.vercelli@finsoft.it


RE: Olingo and JPA

Posted by "Grande, Oliver" <ol...@sap.com>.
Hello Luca,

you can find an open source project, which is currently under development, at https://github.com/SAP/olingo-jpa-processor-v4.

Regards,
Oliver


-----Original Message-----
From: Luca Vercelli [mailto:l.vercelli@finsoft.it] 
Sent: Montag, 18. Dezember 2017 14:32
To: user@olingo.apache.org
Subject: Olingo and JPA

Dear all,

I am new to Olingo.

I have a working JPA project, with database, entites and all. I would 
like to expose some entities to clients via OData.

I have found an interesting class in "Java V2" section:

org.apache.olingo.odata2.processor.jpa.ODataJPAContext

However, I cannot find any such class in "Java V4" section. Is that part 
of project abandoned? Should I switch to OData V2?

Thank you.


-- 
Luca Vercelli

Finsoft srl
C.so Svizzera 185/bis
10149 Torino

Mail: l.vercelli@finsoft.it