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.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193661#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...