Hibernate version:3.0
Name and version of the database you are using:Db2 8.1
Application type: Web application
Hello,
I would like to use an id generator to generate a value for a non-id property of one of my entities.
The entity has an unique id (which is generated using a MultipleHiLoPerTableGenerator) but also a unique number which I would like to generate also using the MultipleHiLoPerTableGenerator.
The reasoning behind this choice is that I am working on an existing database that is being used by multiple client/server delphi apps. Those apps store the id's and unique numbers in one table, so if I create id's and unique numbers I should do the same thing, otherwise those existing apps would run into trouble.
So my question is: is it possible to define a generator that is used by a non-id property, or what would be the best way to use the existing MultipleHiLoPerTableGenerator class to generate that unique number. Should I just create a MultipleHiLoPerTableGenerator myself and set all necessary parameters in the code, or is there a better way?
Thanks for any suggestions
Luc
|