<?XML version= "1.0" encoding= "GBK"?><!DOCTYPE hibernate-mapping Public "-//hibernate/hibernate mapping DTD 3.0//en" "http://hibernate.sourceforge.net/ Hibernate-mapping-3.0.dtd "><!--the root element of the hibernate mapping file -<hibernate-mapping Package= "Com.hrsys.model"> <classname= "Employee"Table= "Emp_table"> <IDname= "id"type= "integer"column= "emp_id"> <Generatorclass= "Identity" /> </ID> < Propertyname= "Name"column= "Emp_name"type= "string"length= " the"/> < Propertyname= "Password"column= "Emp_pass"type= "string"length= " the" /> < Propertyname= "Salary"column= "Emp_salary"type= "Double" /> < Propertyname= "DepartmentID"column= "mgr_id"type= "integer" /> < Propertyname= "Roleid"column= "role_id"type= "integer" /> </class></hibernate-mapping>
1. Configure the location of persistent packages;
2, configure the mapping class with the database table;
3, configure the primary key corresponding data table column name;
4, configure the non-primary key corresponding data table column name;
Hibernate simple Configuration