First, see the Hibernate API
http://tool.oschina.net/apidocs/apidoc?api=hibernate-3.6.10
http://tool.oschina.net/apidocs/apidoc?api=hibernate-4.1.4
Description: The two versions were posted because the Flushmode property differs from the 3.6 and 4.1 settings, the 3.6 Flushmode attribute is a class, and 4.1 has replaced the Enum.
Second, Flushmode properties
This explains its effect in Org.hibernate Class Flushmode: Represents a flushing strategy. The flush process synchronizes database state with session state is detecting state changes and executing SQL statements.
Represents a flushing (a translation refresh or empty seemingly inappropriate, tentatively understood as a refresh) policy, which will process the data in the thread by changing the state of the session and executing the state of the SQL.
static FlushMode |
ALWAYS The is Session flushed before every query. |
static FlushMode |
AUTO The is Session sometimes flushed before query execution on order to ensure this queries never return stale state. |
static FlushMode |
COMMIT The is Session flushed was Transaction.commit() called. |
static FlushMode |
MANUAL The is Session -ever flushed when was Session.flush() explicitly called by the application. |
static FlushMode |
NEVER Deprecated. use MANUAL instead. |
There are five Flushmode attributes, respectively:
..
Acknowledgement: http://blog.csdn.net/accpsz/article/details/6010618
Flushmode Property: