openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbt123 <>
Subject entity is not available in memory-repost
Date Wed, 16 May 2012 20:40:47 GMT

I am new on OpenJPA....not sure if it has very common solution.

OpenJpa version: 2.1.1
Running on WAS6.1.37

I have 7 entities in a transaction, first set values in Entity A (fields
id=10203, name, pname..... etc record) then B (2 record), C(5
records), E(3 records), F (2 records), G (2 records) entities.

While again setting values in Entity C, it needs previous entered
data(previous 5 records) from 
C  using custom query.

Query query = em.createQuery( "SELECT z FROM C z where'10203'");

I am using threadLocal to set EntityManager (I have already checked, it is
trying to get data from the same entityManager which has set value in entity
A ). There are lot of business logic involved in between entity A till G.

The problem is, I am not able to get previous data(5 records) from entity C
using the
above SQL.  it always return zero result for id=10203.

Can anyone please help?

Many Thanks.

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message