hibernate逆向工程生成的实体映射需要修改

根据实际情况进行修改,主要2处,注释的位置<!-- 把catalog="platform"删掉 -->,<!-- 替换为native -->
 
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN">
<!-- Generated 2016-8-5 17:22:01 by Hibernate Tools 3.4.0.CR1 -->

<hibernate-mapping>

<!-- 把catalog="platform"删掉 -->

<class table="ac_authority" name="com.chanct.egap.common.model.AcAuthority"><id name="authorityId" type="java.lang.Long"><column name="authority_id"/>

<!-- 替换为native -->

<generator class="native"/></id><property name="name" type="string"><column name="name" length="20"/></property><property name="type" type="string"><column name="type" length="5"/>         </property><property name="orderNo" type="java.lang.Integer"><column name="order_no"/></property><property name="available" type="string"><column name="available" length="5"/></property><set table="ac_role_authority" name="acRoleAuthorities" fetch="select" lazy="true" inverse="true"><key><column name="authority_id"/></key><one-to-many class="com.chanct.egap.common.model.AcRoleAuthority"/></set><set table="ac_authority_module" name="acAuthorityModules" fetch="select" lazy="true" inverse="true"><key><column name="authority_id"/></key><one-to-many class="com.chanct.egap.common.model.AcAuthorityModule"/></set></class></hibernate-mapping>

posted on 2016-08-05 17:42  struggle_beiJing  阅读(240)  评论(0编辑  收藏  举报

导航