Student.hbm.xml

<?xmlversion="1.0"encoding="UTF-8"?>

<!DOCTYPEhibernate-mappingPUBLIC

"-//Hibernate/HibernateMappingDTD3.0//EN"

"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mappingpackage="cn.com.svse.model">

<classname="Student"table="tb_student">

<idname="stuId"type="java.lang.Integer">

<columnname="stuId"/>

<generatorclass="identity"/>

</id>

<propertyname="stuName"type="string">

<columnname="stuName"length="30"not-null="true"/>

</property>

<propertyname="stuSex"type="string">

<columnname="stuSex"length="30"not-null="true"/>

</property>

<propertyname="stuAge"type="int">

<columnname="stuAge"length="30"not-null="true"/>

</property>

<propertyname="stuEmail"type="string">

<columnname="stuEmail"length="30"not-null="true"/>

</property>

<propertyname="stuAddr"type="string">

<columnname="stuAddr"length="30"not-null="true"/>

</property>

</class>

</hibernate-mapping>

相关推荐