From: Christoph S. <ch...@sc...> - 2002-03-05 16:41:36
|
Gavin_King/Cirrus%CI...@ci... wrote: > >>There needs to be a way to tell hibernate to use the native key >>generator for a table. And the code needs to check for it. Do you think >>its better to compare the class of the keygenerator? >> > >hhmmmmm instanceof sort of looks bad though in this case its perfectly >defensible. My suggestion was to have > > ClassPersister.isUsingNativeKeyGeneration() > ok, i added a boolean to ClassPersister, and I init it with instanceof. I'll also document it in the native id generator. > > > >>I will have to add two things to Dialect: one for the identity select, >>and one for the creation of the identity column. >> > >Thats all good. I'm not at all perturbed by that (anyway Dialect is an >abstract class, not an interface, so we can do more with it). > One problem that i realized now is that the Classpersister is not aware of the DatabaseDialect. The Database Dialect is only set when a schema is generated. For the database native keys to work, it will be necessary that this Property is set. I'm quite happy with it being a property, because i want to use one mapping file for different databases. One more thing: How can I run the unit tests? Is this documented somewhere? regards chris > > > >_______________________________________________ >Hibernate-devel mailing list >Hib...@li... >https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > |