Meaningless Drivel is fun!
The moose likes Object Relational Mapping and the fly likes Sequence number issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Sequence number issue" Watch "Sequence number issue" New topic

Sequence number issue

hong ye

Joined: Nov 11, 2008
Posts: 7

Our system uses JPA to map classes to tables.

My question is: our system has a Customer table which has total 1114444 records and max number is 1533000. but the last number for Customer_seq in Oracle databse is 36000. Don`t match. but no unique constraint issue.

Can someone explain why? how JPA or hibernate generates next sequence value to insert into Customer table?

Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

That depends on your id generation strategy.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: Sequence number issue
It's not a secret anymore!