@TableGenerator does not increment pkColumnValue by allocationSize
------------------------------------------------------------------
Key: HHH-3407
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3407
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.6, 3.2.4
Environment: JBoss 4.2.3, RHEL4, JDK1.5
Reporter: Dan Ciarniello
According to the JPA, the allocationSize attribute to @TableGenerator is "The amount
to increment by when allocating id numbers from the generator" but the value is
actually incremented by 1 regardless of allocationSize. The id is generated properly
apparently according to the formula
id = lastkeyval*allocationSize + i where 0<i<allocationSize
The problems with this algorithm are:
1. One cannot tell what the next key value range is from the key table without knowing the
allocationSize (minor)
2. If the allocationSize is reduced, already existing key values will be generated
(major)
3. If two applications are configured with different allocation sizes, there will be an
overlap in generated values (major)
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira