File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate ID Sequence Generator Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Hibernate ID Sequence Generator" Watch "Hibernate ID Sequence Generator" New topic
Author

Hibernate ID Sequence Generator

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
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?
 
IntelliJ Java IDE
 
subject: Hibernate ID Sequence Generator
 
Threads others viewed
Hibernate: confusion how to include seperate attribute in many-to-many mapping file
Fetch only one column using hibernate 3.0
HibernateTools Generating Wrong Code
problem in one-to-many while saving
What hibernate.hbm2ddl.auto value to use?
IntelliJ Java IDE