Is it okay to flush the data to the database first?  Flushing still doesn't
commit the data (not until the transaction commits).  But, at least the
data would be available for the query.  I would promote this processing
first...  Doing the in-memory query analysis can be costly...

As I look into this a bit more, the openjpa.FlushBeforeQueries property has
a default value of "true".  So, we should already be pushing the data to
the database.  Maybe you need to post your persistence.xml to see what type
of environment you are running with.  Something isn't making sense yet...

Kevin

On Wed, May 16, 2012 at 4:55 PM, pbt123 <prabh...@in.ibm.com> wrote:

> Thanks for reply
>
> First, the 5 records were not committed into database yet, these are still
> in memory as the transaction has not completed and I need to get the same 5
> record for some business validation purpose.
>
> I am using application-managed persistence. My EMF starts as soon as
> someone
> login to the GUI and EM will create whenever we start a new transaction and
> close after committing the transaction.
>
> I think, I am missing some basic property which hands this condition. Could
> you please point me to the properties?
>
> Thanks
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/entity-is-not-available-in-memory-repost-tp7562678p7562793.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Reply via email to