[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5933) Sequence Generator doe not allow negative values for allocation-size
Rich Sayre (JIRA)
noreply at atlassian.com
Wed Feb 16 08:22:05 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39986#action_39986 ]
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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list