Suppose, I have a table with the following script:
CREATE TABLE TEST
(
ID NUMBER (10) NOT NULL,
DESCRIPTION VARCHAR2 (480)
) ....
Now I have a sequence also, as the following :
CREATE SEQUENCE TEST_ID_SEQ INCREMENT BY 1 START WITH 1 NOMAXVALUE
NOCYCLE NOCACHE ORDER;
and also the O/R mapping :
<class name="Test" table="TEST" lazy="false">
<cache usage="read-write" />
<id name="id" column="ID" type="long" length="10" unsaved-value="-1" >
<generator class="sequence">
<param name="sequence">TEST_ID_SEQ</param>
</generator>
</id>
<property name="desc" column="DESCRIPTION" type="string"
length="480"/>
</class>
Everything was OK. but there was a problem? when the value of the id
grew to 16331123, the sequence couldn't be created more and more.
(note: in the Test class, I have property which is long and is named id.)