This content has been marked as final.
Show 1 reply
-
1. Re: when do we call entity manager flush and refresh methods
jaikiran Dec 2, 2008 3:11 AM (in response to mravikrish)The Entitymanager javadoc might help http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html
In brief - the flush call will issue SQL queries to update the database with the changes that have been done to the in memory entities. The refresh on the other hand pulls the entity state from the database and overwrites the in memory changes.