zTree市县实现三个梯级数据库映射

zTree市县实现三个梯级数据库映射

zTree市县实现三个梯级数据库映射

Province.hbm.xml:

<?xml version="1.0" encoding="UTF-8"?

>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping>
<class name="com.gwtjs.model.Province" table="t_area_tab">
<id access="field" name="id" type="java.lang.Long">
<generator class="native"/>
</id>
<property name="provinceCode" length="20" access="field" not-null="true" type="java.lang.String">
<column name="province_code"></column>
</property>
<property name="provinceName" length="50" access="field" not-null="true" type="java.lang.String">
<column name="province_name"></column>
</property>
<property name="cityCode" length="20" access="field" not-null="true" type="java.lang.String">
<column name="city_code"></column>
</property>
<property name="cityName" length="50" access="field" not-null="true" type="java.lang.String">
<column name="city_name"></column>
</property>
<property name="countyCode" length="20" access="field" not-null="true" type="java.lang.String">
<column name="county_code"></column>
</property>
<property name="countyName" length="50" access="field" not-null="true" type="java.lang.String">
<column name="county_name"></column>
</property>
</class>
</hibernate-mapping>

版权声明:本文博客原创文章,博客,未经同意,不得转载。

05-11 16:11