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