This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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

Win a copy of Head First Android this week in the Android forum!
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]
jQuery in Action, 3rd edition
subject: Sequence number issue
It's not a secret anymore!