The DerbyDialect was contributed by an external party. If you have a better implementation patches are welcome in our jira.
But it would be nice to know why the external contributor choose to use tablehilo as the default and have that "fun" identitycolumnstring. The original contributor was Simon Johnston via http://opensource.atlassian.com/projects/hibernate/browse/HB-1224. I've cc'ed him for his comment. /max > Hi list, > > Migrating a test project from one dialect to another I've stumbled > across something that looks to me like a coding mistake, but not beeing > very familiar with Derby, I wonder if I simply overlooked something? > > Here's the code: (from org.hibernate.dialect.DerbyDialect) > > public Class getNativeIdentifierGeneratorClass() { > return TableHiLoGenerator.class; > } > > This overrides the implementation in Dialect that queries several > template methods about the supported generators. In effect, that > prevents any other generation strategy from beeing used. This might be > intentional, but if so, why is at least one template method overridden > as well? > > /** > * This is different in Cloudscape to DB2. > */ > public String getIdentityColumnString() { > return "not null generated always as identity"; //$NON-NLS-1 > } > > I therefore hacked my own dialect, reverting > getNativeIdentifierGeneratorClass to its super implementation, hooked it > in the test application, where it passed all testcases. Of course, this > does not guarantee the absence of errors, so I'd like to ask: > > Is there a reason why the other sub-strategies to native generation are > disabled for Derby? > > Regards > Adrian Moos > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > hibernate-devel mailing list > hibernate-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hibernate-devel -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss Inc [EMAIL PROTECTED] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel