[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5194) SequenceHiLoGenerator does not update the lo value

Swen Thümmler (JIRA) noreply at atlassian.com
Wed May 5 09:54:05 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=36910#action_36910 ] 

Swen Thümmler commented on HHH-5194:
------------------------------------

The following patch fixes it:
--- core/src/main/java/org/hibernate/id/SequenceHiLoGenerator.java.orig 2010-05-05 15:47:36.015938620 +0200
+++ core/src/main/java/org/hibernate/id/SequenceHiLoGenerator.java      2010-05-05 15:47:37.815976543 +0200
@@ -86,6 +86,7 @@
                        }
                }
 
+                lo++;
                return value.makeValueThenIncrement();
        }


> SequenceHiLoGenerator does not update the lo value
> --------------------------------------------------
>
>                 Key: HHH-5194
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5194
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.5.1
>            Reporter: Swen Thümmler
>            Priority: Critical
>
> SequenceHiLoGenerator checks lo > maxLo but never increments lo. This leads to duplicate ids when using the same sequence for multiple tables. This change was made in r18789

-- 
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