雪狼小记 2011-08-17
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPEhibernate-mappingPUBLIC"-//Hibernate/HibernateMappingDTD3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<classname="edu.sun.entity.Users"table="USERS">
<!--属性名主键-->
<idname="uid">
<!--字段名-->
<columnname="id"></column>
<!--主键生成器-->
<generatorclass="sequence">
<!--序列名称-->
<paramname="sequence">seq_sun</param>
</generator>
</id>
<propertyname="uname"column="name"type="java.lang.String">
</property>
<propertyname="upass"column="PASSWORD"></property>
<!--如果属性名和字段名相同可以省略字段名-->
<propertyname="telephone"></property>
<propertyname="userName"column="userName"></property>
<propertyname="isAdmin"></property>
</class>
</hibernate-mapping>