Flushmode Property:

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.