配置文件:
<hibernate-mapping>
    <class name="MonthTemp" table="MONTH_TEMP" >
        <id name="id" type="long">
            <column name="ID" />
            <generator class="assigned" >
            </generator>
        </id>
        <property name="visittime" type="timestamp">
            <column name="VISITTIME" length="7" />
        </property>
        ......
    </class>
</hibernate-mapping>创建的序列和触发器:
create sequence seq_month_temp;create or replace trigger trigger_month_temp
before insert on month_temp For each row
begin
   select seq_month_temp.nextval  into :new.id   from dual;
end;