-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate id sequence problem in oracle
PostPosted: Thu Aug 23, 2007 9:44 pm 
Newbie

Joined: Thu Aug 23, 2007 8:55 pm
Posts: 3
Good day guys,

I'm having a problem with the generation of sequence id in hibernate (using oracle 10g db). My problem is the id sequence generation is incremented by two's. My definition of sequence is like this:

CREATE SEQUENCE "MEMBER_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE

as you can see my increment value starts in 1, but when i try to save a record in oracle what happend is it increments by 2. e.g.

table MEMBER

id name
2 aaa
4 bbb
6 ccc

which supposed to be

id name
1 aaa
2 aaa
3 aaa


what i noticed is when i try to retreive the identifier from session.save(obj)
i get the right sequence (incremented by one only), but the sequence value saved in oracle is incremented by 2

Any help is highly appreciated here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.