<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.pcic.fwcz.login.User" table="TBL_USER">
<id name="uhid" type="java.lang.String">
<column name="UHID"></column>
<generator class="native"></generator>
</id>
<property name="uname" type="java.lang.String">
<column name="UNAME" length="50"></column>
</property>
<property name="upass" type="java.lang.String">
<column name="UPASS" length="50"></column>
</property>
</class>
</hibernate-mapping>
以为我们在<generator class="native"></generator> class="native",自增序列,我们需要在oracle数据库执行这句话就你那个解决这个问题。
CREATE SEQUENCE HIBERNATE_SEQUENCE MINVALUE 90000 MAXVALUE 999999999999999999999999 INCREMENT BY 1 NOCYCLE;