Several states of Hibernate

Source: Internet
Author: User

Three states of objects in hibernate

1) Instantaneous state

There is no data in the database that matches it

Not included in the session management, complete the direct destruction

2) Persistent State

There is data in the database that matches it

Included in session management

When cleaning up the cache (Dirty data detection) is always in the database

Consistent Data Retention

3) Managed Status

There is data in the database that matches it

Not included in session management

Summary: Hibernate does the Save or update operation, usually based on the object

State to operate, enterprise development is generally used saveorupdate to replace

Save or Update method

650) this.width=650; "Src=" http://images.cnitblog.com/blog/432441/201310/21101906- B68babbf49d34e1aac6599fd2a9d97ae.jpg "width=" 594 "height=" 315 "alt=" 21101906-b68babbf49d34e1aac6599fd2a9d97a "/ >


360.doc


Several states of Hibernate

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.