Senior |
 |
Joined: Tue Sep 23, 2003 8:18 am Posts: 137 Location: Johannesburg, South Africa
|
Looking at what Hibernate has available, and that I doubt it can (or even should) allow for multiple database ID generation using a SEQ type ID.
I'd go with creating your own generator class that uses the same principle as the SEQUENCE generator. I'm guessing that the first bit (00001 - 00003) is going to be unique? And that you only append the (001) to the end each time?
Then, change you Hibernate mapping to use an ASSIGNED ID. That way, you run you can still use sequence - just do that query manually (can use Hibernate to do this bit too) - and create the PK, which you then assign to your mapping.
-G
|
|