openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi P Palacherla <>
Subject Re: insertable/updatable = false question
Date Thu, 13 Aug 2009 23:46:00 GMT


I think I found a better solution.

after flush() 
call em.refresh(e2)
This will refresh the state of e2 from the datastore. 

now e2.gete1() should return NON-NULL value.

Previously, it was not working because even though flush() updates the
datastore with values of e2.
The next call e2.gete1() is not going to datastore but using the e2's state
in the persistenceContext.

Please try and let me know if it has any issues.


ljnelson wrote:
> On Thu, Aug 13, 2009 at 4:39 PM, Ravi P Palacherla (via Nabble) <
>> wrote:
>> Hi Laird,
>> I also think that you should get a NON-NULL for e2.gete1() after flush,
>> provided e2 is managed at the time you are doing e2.gete1().
> Interestingly enough, I have run this using all the persistence providers,
> and they all give me NULL.  I just can't see reading the spec that way,
> but
> everyone has, I guess.
> Let me try your suggestion.
> Thanks,
> Laird

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

View raw message