Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

unique id generation for all DB vendors

 
Mohan Ramu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
unique id generation for all DB vendors


I have a project which is developed using hibernate- jpa annoatation.

I have chance to create id using JPA which are AUTO, Increment, sequence and table.

Auto is working fine for all DB vendors but, it increase the id for all table together.

Ex: Table a - id is 100

table b id is 101.

c id is 102.

i wanna have ids like

For table A id should be 100 to 1000

For table B id should be 100 to 1000

for all tables also.

I don't want to create separate sequence & Table and make DB fill.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!