"Java" Hibernate4 the first part of the actual combat hibernate getting Started

Source: Internet
Author: User

What is hibernate; the principle of ormapping

Hibernate is a lightweight ormapping framework.


Ormapping Basic Rules:
class and table mappings.
A data map in the instance and database tables.
The properties of the instance and the field mappings in the database table.
Table names and class names can be different.
A class can map multiple tables.
A table can map multiple objects.
The property field name of the class can be different from the field name in the database.
The number of attribute fields in a class can be different from the number of fields in the database.
The class's attribute field order can be different from the field order in the database.
The property field type of the class is different from the field type in the database, but can be converted to each other.
There can be no primary key in the database table, but the primary key field must be set in the object.
The relationships between database tables are mapped into relationships between objects.


is to put the data inside the object and the data inside the database, according to a certain rules of the process of mapping, called ormappiing.


XXX.cfg.xml
XXX.hbm.xml

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.