views:

111

answers:

1

hi all,

how can i set openjpa to flush before query. When i change some values in database i want to propagate these changes into application.

I tried this settings in persistence.xml:

<property name="openjpa.FlushBeforeQueries" value="true" />
<property name="openjpa.IgnoreChanges" value="false"/> false/true - same behavior to my case
<property name="openjpa.DataCache" value="false"/>
<property name="openjpa.RemoteCommitProvider" value="sjvm"/>
<property name="openjpa.ConnectionRetainMode" value="always"/>
<property name="openjpa.QueryCache" value="false"/>

Any idea? Thanks

A: 

calling refresh() on an object inside trasaction does the trick :)

Ales