[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2347) Improvement to DerbyDialect default identy generation mode

Emmanuel Bernard (JIRA) noreply at atlassian.com
Wed Jun 13 11:40:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27233 ] 

Emmanuel Bernard commented on HHH-2347:
---------------------------------------

I guess it make sense for 3.3

> Improvement to DerbyDialect default identy generation mode
> ----------------------------------------------------------
>
>                 Key: HHH-2347
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2347
>             Project: Hibernate3
>          Issue Type: Patch
>    Affects Versions: 3.2.1
>            Reporter: Fabrizio Giustina
>         Attachments: DerbyDialect-identity.diff
>
>
> although derby supports identities org.hibernate.dialect.DerbyDialect strangely uses an HiLo generation strategy for ids (for any other dialects that support identities IdentityGenerator is the default).
> Even more curiously, DerbyDialect overrides getIdentityColumnString() from the Db2 dialect by using "generated ALWAYS as identity" instead of "generated BY DEFAULT as identity". Derby however fully supports "by default" in identities as clarified in http://db.apache.org/derby/docs/10.1/ref/rrefsqlj37836.html .
> "by default" should be preferred since it allows a direct insertion when needed (and I can't see no reason why enabling it for db2 and not for derby).
> The patch attached simply deletes two methods, so that the default implementation from Db2Dialect is used:
> - removing getIdentityColumnString() make derby use "by default" identities like db2 already does
> - removing getNativeIdentifierGeneratorClass() make it choose IdentityGenerator.class (it falls back to the default strategy used in org.hibernate.dialect.Dialect)
> note that part of this issue has already been reported in HHH-1918 (not addressing the identity generation string)

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