You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Russell Collins <Ru...@mclaneat.com> on 2010/03/22 21:02:32 UTC

OpenJPA 2.0 vs 1.2

I could not find this information so I apologize if there has been a discussion and I missed it.  Basically what I am wondering is if OpenJPA 2.0 is backward compatible with OpenJPA 1.2.  If I were to upgrade my OpenJPA to 2.0 would I need to change the code that I have to make it conform to the new 2.0 specification?



Russell Collins
Sr. Software Engineer
McLane Advanced Technology
254.771.6419

[cid:image001.jpg@01CAC9D0.B0DBB610]

"Do or do not, there is no try." - Yoda


________________________________
CONFIDENTIALITY NOTICE: The information contained in this electronic mail (email) transmission (including attachments), is intended by MCLANE ADVANCED TECHNOLOGIES for the use of the named individual or entity to which it is addressed and may contain information that is privileged, confidential and/or protected as a trade secret. It is not intended for transmission to, or receipt by, any individual or entity other than the named addressee(s). If you have received this email in error, please delete it (including attachments) and any copies thereof without printing, copying or forwarding it, and notify the sender of the error by email reply immediately.

RE: OpenJPA 2.0 vs 1.2

Posted by Russell Collins <Ru...@mclaneat.com>.
Thank you.  That is great news.

-----Original Message-----
From: Kevin Sutter [mailto:kwsutter@gmail.com]
Sent: Monday, March 22, 2010 3:12 PM
To: users@openjpa.apache.org
Subject: Re: OpenJPA 2.0 vs 1.2

Hi Russell,
There should be no reason to change code as you move from OpenJPA 1.2 to
OpenJPA 2.0.  We have had a few "testamonials" in our users and dev mailing
lists confirming this.  The JPA Expert Group really tried to allow for
binary compatibility as we move from JPA 1.0 specification to JPA 2.0.

The exceptions would be in the area of using features in OpenJPA 1.2 that
were beyond the JPA 1.0 spec and the new JPA 2.0 spec defined slightly
different behavior.  For example, in OpenJPA 1.2, we defined a detach()
method on our EM implementation that returned a detached version of the
entity object.  JPA 2.0 defined an in-place detach() method (no return
value).  If you were dependent on the copy aspect of detach(), then you
might need to modify your application or configuration to get the previous
implementation.

We've attempted to document these type of situations in our manual [1].

Good luck and let us know your results!
Kevin

[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#jpa_2.0_incompatibilities

On Mon, Mar 22, 2010 at 3:02 PM, Russell Collins <
Russell.Collins@mclaneat.com> wrote:

>  I could not find this information so I apologize if there has been a
> discussion and I missed it.  Basically what I am wondering is if OpenJPA 2.0
> is backward compatible with OpenJPA 1.2.  If I were to upgrade my OpenJPA to
> 2.0 would I need to change the code that I have to make it conform to the
> new 2.0 specification?
>
>
>
>
>
>
>
> *Russell Collins***
>
> Sr. Software Engineer
>
> McLane Advanced Technology
>
> 254.771.6419
>
>
>
> [image: signaturelogo]
>
>
>
> "Do or do not, there is no try." - Yoda
>
>
>
> ------------------------------
> CONFIDENTIALITY NOTICE: The information contained in this electronic mail
> (email) transmission (including attachments), is intended by MCLANE ADVANCED
> TECHNOLOGIES for the use of the named individual or entity to which it is
> addressed and may contain information that is privileged, confidential
> and/or protected as a trade secret. It is not intended for transmission to,
> or receipt by, any individual or entity other than the named addressee(s).
> If you have received this email in error, please delete it (including
> attachments) and any copies thereof without printing, copying or forwarding
> it, and notify the sender of the error by email reply immediately.
>

CONFIDENTIALITY NOTICE: The information contained in this electronic mail (email) transmission (including attachments), is intended by MCLANE ADVANCED TECHNOLOGIES for the use of the named individual or entity to which it is addressed and may contain information that is privileged, confidential and/or protected as a trade secret. It is not intended for transmission to, or receipt by, any individual or entity other than the named addressee(s). If you have received this email in error, please delete it (including attachments) and any copies thereof without printing, copying or forwarding it, and notify the sender of the error by email reply immediately.

Re: OpenJPA 2.0 vs 1.2

Posted by Simon Droscher <si...@elasticpath.com>.
Created  https://issues.apache.org/jira/browse/OPENJPA-1613 OPENJPA-1613 
which includes a test case demonstrating the issue I encountered.
-- 
View this message in context: http://n2.nabble.com/OpenJPA-2-0-vs-1-2-tp4780098p4861967.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA 2.0 vs 1.2

Posted by Kevin Sutter <kw...@gmail.com>.
That would be great.  Thanks!

On Tue, Apr 6, 2010 at 3:45 PM, Simon Droscher <
simon.droscher@elasticpath.com> wrote:

>
> Kevin,
>
> I am currently trying to write an OpenJPA test that demonstrates the
> problem, once I have that I will create the JIRA.
>
>  Simon
>
>
> Kevin Sutter wrote:
> >
> > Hi Simon, did you open a JIRA or post this problem when you encountered
> > it?
> >
>
> --
> View this message in context:
> http://n2.nabble.com/OpenJPA-2-0-vs-1-2-tp4780098p4861255.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: OpenJPA 2.0 vs 1.2

Posted by Simon Droscher <si...@elasticpath.com>.
Kevin,

I am currently trying to write an OpenJPA test that demonstrates the
problem, once I have that I will create the JIRA.

  Simon


Kevin Sutter wrote:
> 
> Hi Simon, did you open a JIRA or post this problem when you encountered
> it?
> 

-- 
View this message in context: http://n2.nabble.com/OpenJPA-2-0-vs-1-2-tp4780098p4861255.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA 2.0 vs 1.2

Posted by Kevin Sutter <kw...@gmail.com>.
On Mon, Mar 22, 2010 at 5:16 PM, Simon Droscher <
simon.droscher@elasticpath.com> wrote:

>
> I had one small issue when upgrading that required a code change.
>
> We are using property access, and I found OpenJPA 2.0.0-beta2 threw an
> error
> when it encountered abstract @MappedSuperclass classes which didn't contain
> any annotated properties. This worked fine under OpenJPA 1.2.x but 2.0.0
> complains it can't determine the access type. I had to add
> @Access(AccessType.PROPERTY) annotation to these classes.
>

Hi Simon, did you open a JIRA or post this problem when you encountered it?
I don't remember seeing this problem before.  I took a quick search and
couldn't find the JIRA.  If you have a link, I'd appreciate it.  Otherwise,
we should open a JIRA and, hopefully, get this resolved before we ship.  If
nothing else, this needs to be documented.  Thanks!

Kevin


>
>
> I also found problems in a couple of cases where we were using the
> Non-Standard Join Syntax
> (
> http://openjpa.apache.org/builds/2.0.0-beta2/apache-openjpa-2.0.0-beta2/docs/manual/ref_guide_mapping_notes_nonstdjoins.html
> )
>
> --
> View this message in context:
> http://n2.nabble.com/OpenJPA-2-0-vs-1-2-tp4780098p4780847.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: OpenJPA 2.0 vs 1.2

Posted by Simon Droscher <si...@elasticpath.com>.
I had one small issue when upgrading that required a code change.

We are using property access, and I found OpenJPA 2.0.0-beta2 threw an error
when it encountered abstract @MappedSuperclass classes which didn't contain
any annotated properties. This worked fine under OpenJPA 1.2.x but 2.0.0
complains it can't determine the access type. I had to add
@Access(AccessType.PROPERTY) annotation to these classes.


I also found problems in a couple of cases where we were using the
Non-Standard Join Syntax
(http://openjpa.apache.org/builds/2.0.0-beta2/apache-openjpa-2.0.0-beta2/docs/manual/ref_guide_mapping_notes_nonstdjoins.html)

-- 
View this message in context: http://n2.nabble.com/OpenJPA-2-0-vs-1-2-tp4780098p4780847.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: OpenJPA 2.0 vs 1.2

Posted by Jean-Baptiste BRIAUD -- Novlog <j-...@novlog.com>.
The only code I had to change is the method detach on the entityManager, it now return void, the object passed as a parameter is no more returned but changed "by address".

On Mar 22, 2010, at 21:12 , Kevin Sutter wrote:

> Hi Russell,
> There should be no reason to change code as you move from OpenJPA 1.2 to
> OpenJPA 2.0.  We have had a few "testamonials" in our users and dev mailing
> lists confirming this.  The JPA Expert Group really tried to allow for
> binary compatibility as we move from JPA 1.0 specification to JPA 2.0.
> 
> The exceptions would be in the area of using features in OpenJPA 1.2 that
> were beyond the JPA 1.0 spec and the new JPA 2.0 spec defined slightly
> different behavior.  For example, in OpenJPA 1.2, we defined a detach()
> method on our EM implementation that returned a detached version of the
> entity object.  JPA 2.0 defined an in-place detach() method (no return
> value).  If you were dependent on the copy aspect of detach(), then you
> might need to modify your application or configuration to get the previous
> implementation.
> 
> We've attempted to document these type of situations in our manual [1].
> 
> Good luck and let us know your results!
> Kevin
> 
> [1]
> http://openjpa.apache.org/builds/latest/docs/manual/manual.html#jpa_2.0_incompatibilities
> 
> On Mon, Mar 22, 2010 at 3:02 PM, Russell Collins <
> Russell.Collins@mclaneat.com> wrote:
> 
>> I could not find this information so I apologize if there has been a
>> discussion and I missed it.  Basically what I am wondering is if OpenJPA 2.0
>> is backward compatible with OpenJPA 1.2.  If I were to upgrade my OpenJPA to
>> 2.0 would I need to change the code that I have to make it conform to the
>> new 2.0 specification?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> *Russell Collins***
>> 
>> Sr. Software Engineer
>> 
>> McLane Advanced Technology
>> 
>> 254.771.6419
>> 
>> 
>> 
>> [image: signaturelogo]
>> 
>> 
>> 
>> "Do or do not, there is no try." - Yoda
>> 
>> 
>> 
>> ------------------------------
>> CONFIDENTIALITY NOTICE: The information contained in this electronic mail
>> (email) transmission (including attachments), is intended by MCLANE ADVANCED
>> TECHNOLOGIES for the use of the named individual or entity to which it is
>> addressed and may contain information that is privileged, confidential
>> and/or protected as a trade secret. It is not intended for transmission to,
>> or receipt by, any individual or entity other than the named addressee(s).
>> If you have received this email in error, please delete it (including
>> attachments) and any copies thereof without printing, copying or forwarding
>> it, and notify the sender of the error by email reply immediately.
>> 


Re: OpenJPA 2.0 vs 1.2

Posted by Kevin Sutter <kw...@gmail.com>.
Hi Russell,
There should be no reason to change code as you move from OpenJPA 1.2 to
OpenJPA 2.0.  We have had a few "testamonials" in our users and dev mailing
lists confirming this.  The JPA Expert Group really tried to allow for
binary compatibility as we move from JPA 1.0 specification to JPA 2.0.

The exceptions would be in the area of using features in OpenJPA 1.2 that
were beyond the JPA 1.0 spec and the new JPA 2.0 spec defined slightly
different behavior.  For example, in OpenJPA 1.2, we defined a detach()
method on our EM implementation that returned a detached version of the
entity object.  JPA 2.0 defined an in-place detach() method (no return
value).  If you were dependent on the copy aspect of detach(), then you
might need to modify your application or configuration to get the previous
implementation.

We've attempted to document these type of situations in our manual [1].

Good luck and let us know your results!
Kevin

[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#jpa_2.0_incompatibilities

On Mon, Mar 22, 2010 at 3:02 PM, Russell Collins <
Russell.Collins@mclaneat.com> wrote:

>  I could not find this information so I apologize if there has been a
> discussion and I missed it.  Basically what I am wondering is if OpenJPA 2.0
> is backward compatible with OpenJPA 1.2.  If I were to upgrade my OpenJPA to
> 2.0 would I need to change the code that I have to make it conform to the
> new 2.0 specification?
>
>
>
>
>
>
>
> *Russell Collins***
>
> Sr. Software Engineer
>
> McLane Advanced Technology
>
> 254.771.6419
>
>
>
> [image: signaturelogo]
>
>
>
> "Do or do not, there is no try." - Yoda
>
>
>
> ------------------------------
> CONFIDENTIALITY NOTICE: The information contained in this electronic mail
> (email) transmission (including attachments), is intended by MCLANE ADVANCED
> TECHNOLOGIES for the use of the named individual or entity to which it is
> addressed and may contain information that is privileged, confidential
> and/or protected as a trade secret. It is not intended for transmission to,
> or receipt by, any individual or entity other than the named addressee(s).
> If you have received this email in error, please delete it (including
> attachments) and any copies thereof without printing, copying or forwarding
> it, and notify the sender of the error by email reply immediately.
>