openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: Lifecycle listener invoked on Query
Date Wed, 29 Feb 2012 20:23:35 GMT
I think the current OpenJPA status is such that if you want dirty objects in
an in-flight transaction be included in the result of a query, OpenJPA will
flush the dirty objects to database and then evaluate the query on database
if openjpa.IgnoreChanges=false. 
 
If openjpa.IgnoreChanges=true, OpenJPA will ignore the dirty in-memory
objects and evaluate the query on the unflushed database.

>From your description it looks like you want openjpa.IgnoreChanges=false.
But that setting will also cause a flush and hence a post update
notification.

I have not taken a look at the current code and simply trying to recollect
from my memory. Others may be able to advise you on other options or
solutions.

Also note that using proprietary  OpenJPA API, you can query *only* on the
in-memory objects (may work here as you seem to be looking for a single
object).

-----
Pinaki Poddar
Chair, Apache OpenJPA Project
--
View this message in context: http://openjpa.208410.n2.nabble.com/Lifecycle-listener-invoked-on-Query-tp7329975p7330576.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message