[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4905) Allow consistent handling of numeric primary key values by any integral data type

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Feb 10 22:42:31 EST 2010


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

Steve Ebersole commented on HHH-4905:
-------------------------------------

Most of this discussion centers on the IdentifierGeneratorHelper class and how the id values are "made".

There are 2 main methods on IdentifierGeneratorHelper that play here.
* As I mentioned on HHH-4639, IdentifierGeneratorHelper#get is not particularly problematic.  It is passed a ResultSet and asked to extract the value of appropriate type
* IdentifierGeneratorHelper#createNumber is more problematic.  Especially in its current form because we pass in a primitive long as previously that represented the largest precision we dealt with.  

Additionally many of the generators perform arithmetic (addition, increment) and comparison on the values.  We definitely want to keep this well-performing in the int/long case (aka we don' want to be wrapping/unwrapping these values all the time).

> Allow consistent handling of numeric primary key values by any integral data type
> ---------------------------------------------------------------------------------
>
>                 Key: HHH-4905
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4905
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.5.x
>
>
> Currently Hibernate generally supports short, integer, long.  For certain we should support BigInteger.  BigDecimal (ensuring a zero scale) would be nice too.

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