From: Moos A. <adr...@el...> - 2006-07-12 10:05:59
|
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 |