Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: Re[eclipselink-users] use of JPA mapped object copy

Most likely an issue with OC4J and JTA.  What version of OC4J are you using? 
Could you try your test outside of OC4J, or without JTA?  OC4J did have an
issue outside of a JTA transaction that it called clear() after every query,
this would cause the issue.  If you try your test entirely inside a single
transaction does it work?

It could also be something with your querying, or merge.  Note that with JTA
each transaction, and every query outside a transaction will return
different objects.

Gschwind, Doug wrote:
> Hi James,
> Thanks for the response. Yes, I am using EclipseLink, version 1.0.1.
> In my testing, the relationship from C to A was not JPA mapped, but the
> relationships from A to C and A to B and B to A were. It makes sense why
> C.someA.getC() != C due to the query to find all of the As for the given
> C instance. However, I was seeing where A.B.A != A, once I introduced
> the OneToMany from C to A (intentionally not mapped previously as
> previously C was the subject being passed to em.merge() calls with large
> number of As expected, but C instances are no longer the subject of
> merge calls).
> Nope, no clear() methods were called, and JTA is enabled when running
> within OC4J, but there is no indication that a JTA transaction is being
> started, committed, or otherwise "ended".
> Thanks,
> Doug
> -----Original Message-----
> From: eclipselink-users-bounces@xxxxxxxxxxx
> [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of James
> Sutherland
> Sent: Wednesday, December 17, 2008 12:39 PM
> To: eclipselink-users@xxxxxxxxxxx
> Subject: Re: Re[eclipselink-users] use of JPA mapped object copy
> A.C.A == A should always be true, so this is very odd.  Something
> strange is
> occurring, are you sure you are using EclipseLink?  Try setting logging
> to
> finest and see what is occurring.
> One possibility is that your primary key or relationship is not setup
> correctly.
> Perhaps try the same test with another model or one of the EclipseLink
> examples to confirm that this is true.
> Are you calling clear(), or using JTA and ending the transaction?

--- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top