日期:2014-05-20 浏览次数:20907 次
<?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.ffcs.cip.entity.ShopDict" table="cip_shop_dict"> <id name="id" type="java.lang.Integer"> <column name="id" /> <generator class="identity" /> </id> <many-to-one name="parent" class="com.ffcs.cip.entity.ShopDict" column="parent_id" /> <property name="name" type="java.lang.String"> <column name="name" length="50" /> </property> <property name="orderId" type="java.lang.Integer"> <column name="order_id" /> </property> <set name="childs" inverse="true" cascade="all-delete-orphan" lazy="true" table="cip_shop_dict"> <key column="parent_id"/> <one-to-many class="com.ffcs.cip.entity.ShopDict"/> </set> </class> </hibernate-mapping>