zoukankan      html  css  js  c++  java
  • Hibernate用Oracle的sequence生成自增Id

    Xml代码  收藏代码
      1. <?xml version="1.0" encoding="utf-8"?>  
      2. <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"  
      3. "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">  
      4. <!--  
      5.     Mapping file autogenerated by MyEclipse Persistence Tools 
      6. -->  
      7. <hibernate-mapping>  
      8.     <class name="com.ko.pp.entity.InputUserInfo" table="Input_User_Info" schema="dbname">  
      9.         <id name="id" type="java.lang.Long">  
      10.             <column name="ID" precision="22" scale="0" />  
      11.             <generator class="sequence">  
      12.                 <!--采用Oracle的Sequence机制-->  
      13.             <param name="sequence">INPUT_USER_INFO_SEQ</param>  
      14.         </generator>   
      15.         </id>  
      16.         <property name="name" type="string">  
      17.             <column name="NAME" length="20" />  
      18.         </property>  
      19.         <property name="certno" type="string">  
      20.             <column name="CERTNO" length="30" />  
      21.         </property>  
      22.         <property name="nationality" type="string">  
      23.             <column name="NATIONALITY" length="20" />  
      24.         </property>  
      25.         <property name="gender" type="string">  
      26.             <column name="GENDER" length="1" />  
      27.         </property>  
      28.         <property name="identity" type="string">  
      29.             <column name="IDENTITY" length="20" />  
      30.         </property>  
      31.         <property name="srvcls" type="string">  
      32.             <column name="SRVCLS" length="20" />  
      33.         </property>  
      34.     </class>  
      35. </hibernate-mapping
  • 相关阅读:
    join
    runlevel 运行级别
    腾讯一shell试题.
    awk grep sed 的一些问题
    while read line do done < file
    awk 中 RS,ORS,FS,OFS 区别与联系
    节选
    rpm -qa -qc 查询安装过的软件
    css实现两端对齐
    JS表单验证
  • 原文地址:https://www.cnblogs.com/henuyuxiang/p/4110405.html
Copyright © 2011-2022 走看看