[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2347?page=c...
]
Brice Laurencin commented on HHH-2347:
--------------------------------------
so, does anyone cares about it ?
it lloks like an easy one, and it's a bit boring to have to redefine the DerbyDialect,
even thought it's quite easy.
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira