]
Rich Sayre commented on HHH-5933:
---------------------------------
I just confirmed the same behavior in 3.6.1
Sequence Generator doe not allow negative values for allocation-size
--------------------------------------------------------------------
Key: HHH-5933
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5933
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.0
Environment: Hibernate 3.6.0, Derby 10.6
Reporter: Rich Sayre
In my ORM.xml I have
<sequence-generator name="MY_SEQ" allocation-size="-1"
sequence-name="MY_SEQ"
initial-value="-10" />
When Hibernate creates the sequence the following statement executes:
create sequence MY_SEQ start with -10 increment by 1
In Derby, negative values can be used in Sequences
http://db.apache.org/derby/docs/10.6/ref/rrefsqljcreatesequence.html
I also noticed that if I have:
<sequence-generator name="MY_SEQ" allocation-size="1"
sequence-name="MY_SEQ"
initial-value="-10000000" />
The first time an Id is generated, Hibernate seems to be looping from 0 to initial-value
for some reason.
I kept seeing "values next value for" printed to my output. It took about 5
minutes to get the first id generated.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: