The mapping file describes the relationship between the object and the database, one of the core files that hibernate runs, and the key to writing hibernate.
Mapping files is a matter of thinking from the perspective of Java objects
A basic mapping file
<?XML version= "1.0"?><!DOCTYPE hibernate-mapping Public "-//hibernate/hibernate mapping DTD 3.0//en" "http://hibernate.sourceforge.net/ Hibernate-mapping-3.0.dtd "><hibernate-mapping Package= "Org.zln.hibernate.domain"> <classname= "User"Table= "User"> <IDname= "id"column= "id"> <Generatorclass= "Native"/> </ID> < Propertyname= "Name"column= "Name"/> < Propertyname= "Birthday"column= "Birthday"/> </class></hibernate-mapping><!--Class represents a Java class Name:java class name, because the package property is already set, so you do not need permission to set the class name table: The corresponding database table name, the default and Java class name the same ID used to map the primary key Name:java class represents the primary key Property name Colum: Primary key column, default is the same as property name generator: Primary key generation Method property mapping properties and Normal fields -
Here's just a simple description of what a mapping file is.
Hibernate Mapping File Basic Overview