• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate ID Sequence Generator

 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the ID Sequence in my hibernate mapping files as such.



It works great. However, it uses the same id for all tables. So instead of 1,2,3,4,5 for a table, I could end up with 1,4,5 with 2 and 3 being assigned to objects in other tables. Now that's not a big issue(and my DBA likes it), except for one table. I have one table that grows leaps and bounds more than any other table in the database. So I want this table to have it's own id sequence.

Is there a simple way to do this while using the Hibernate SequenceStyleGenerator?
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!