hibernate sequence主键生成策略

sequence列在hibernate中的配置

 

*.hbm.xml中的配置

 

<hibernate-mapping> 
    <class
            name="com.boco.eoms.duty.model.TawRmAssignDay"
            table="taw_rm_assign_day"
    >

    <id  name="id"  column="id">
       <generator class="sequence">
           <param name="sequence">Q_Taw_rm_assignwork</param>
       </generator>

    </id>

 

     <property ... /> 
    </class> 
</hibernate-mapping> 

 

你可能感兴趣的:(Hibernate,xml)