This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes unique id generation for all DB vendors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "unique id generation for all DB vendors" Watch "unique id generation for all DB vendors" New topic
Author

unique id generation for all DB vendors

Mohan Ramu
Greenhorn

Joined: Dec 26, 2012
Posts: 5
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unique id generation for all DB vendors
 
Similar Threads
what is POJO entity ?
Sequence Generation with Multi database support
Hiberante annotations
JPA impl. w/Hibernate & Oracle PK Sequences/Triggers
sequence generator with mysql