[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4639) Allow JPA SequenceGenerator (SequenceHiLoGenerator) generate BigInteger value

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Feb 10 03:00:34 EST 2010


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

Steve Ebersole commented on HHH-4639:
-------------------------------------

The real issue here is not IdentifierGeneratorHelper#get.  That one is trivial to fix.  The real problem lies in IdentifierGeneratorHelper#createNumber and all the different generators that cache values pulled from the database.  We'd need a performant way to build an abstraction between Long, Integer, Short and BigInteger such that we can perform basic operations (increment and comparison for sure).  Again, though, its the performant aspect thats tricky.  The patch here skirts around that byt simply skipping optimization (the hilo aspect) if BigInteger is used.

> Allow JPA SequenceGenerator (SequenceHiLoGenerator) generate BigInteger value
> -----------------------------------------------------------------------------
>
>                 Key: HHH-4639
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4639
>             Project: Hibernate Core
>          Issue Type: Patch
>          Components: core
>    Affects Versions: 3.5.0-Beta-2
>         Environment: 3.5.0-Beta-2 from jboss-6.0.0.M1
> Oracle 10g
>            Reporter: Alexey Tomin
>         Attachments: BigInteger.patch
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> In database (oracle) we used number(38) identifiers
>     create sequence T_SEQ minvalue 1 maxvalue 999999999999999999999999999 start with 10000000000000044968 increment by 1;
> Version 3.5.0-beta-2 can not generate identifiers more, then long (number(19)).
> I create minimal (no optimal) patch

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