EclipseLink caching data?

Hi All,

ive come up with a small issue in my application - i think its eclipselink related. Im using the latest version of Vaadin, MySQL and the AppFoundation add-on.

The main issue is: if i update a pojo (bound to a table) in the front end and then do a custom query via a container i do not get the updated value. The application still returns the old value. Ive checked the DB and the table does get updated.

I have found a workaround which is to clear the registered factory and then re-register the default factory which forces the application to read all the data again. However I dont think this is the best solution.

Does EclipseLink cache the data? is there a better solution to my workaround?

Thanks

S.

you need to set “eclipselink.maintain-cache” query hint to “false” to make sure your eclipselink/jpa query returns data from database, not cache

/mareks

brilliant thanks

The following also turns off all caching:

 <property name="eclipselink.cache.type.default" value="NONE"/>