Saturday, August 9, 2014

Maven + Hibernate Mappings + Auto Increment Sequence Uses

 <!-- hbm.xml files settings -->

<hibernate-mapping>
    <class name="com.datacraft.mavenproject1.InvDclStockCategory" table="inv_dcl_stock_category" schema="public">
        <id name="id" type="int">
            <column name="id" />
               
             <generator class="sequence">
                 <param name="sequence">inv_dcl_stock_category_id_seq</param>
             </generator>
         
        </id>
        <property name="description" type="string">
            <column name="description" length="255" />
        </property>
      
        <property name="inactive" type="string">
            <column name="inactive" />
        </property>
        <property name="creatDate" type="date">
            <column name="create_date" length="13"  />
        </property>
        <property name="lastUpdateDate" type="date">
            <column name="last_update_date" length="13" />
        </property>
    </class>

No comments:

Post a Comment