Framework learning-hibernate Section 1 installation configuration and Basic Concepts

Source: Internet
Author: User

1. Introduce hibernate

Important Concept: Model Mismatch

2. install and configure

Currently the latest version of hibernate: http://sourceforge.net/projects/hibernate/files/hibernate3/3.6.6.Final/

Other versions download: http://sourceforge.net/projects/hibernate/files/hibernate3/

The downloaded JAR file in the lib directory is the jar package required for hibernate running, so it is indispensable (of course, depending on the situation, some specific requirements will use some jar packages)

3. Basic Concepts

① Development process: there are three main processes. The first method is recommended.

② Domain object restrictions:

You must have a default construction method without parameters (used for later new objects)

Identifier ID, which is optional and generally has

The class cannot be final, and the final class cannot be inherited. If it is declared as final, it will affect the lazy loading.

③ Compile classname. HBM. XML to define an ORM (object relation mapping) for a class)

④ Write JavaCode: Note:ProgramRead the configuration file only once!

So it can be put in the static of a class.

Detailed examples will be explained later.

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.