-->
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.  [ 2 posts ] 
Author Message
 Post subject: Sequences, allocationSize and Oracle (not what you think)
PostPosted: Fri Nov 23, 2007 6:23 am 
Beginner
Beginner

Joined: Thu Dec 16, 2004 11:54 am
Posts: 26
Location: Brussels, Belgium
Hi,
I don't really have an issue, but would just like to get some feedback on the SequenceHiLoGenerator impl. being used when specifying a value larger than 1 to the allocationSize parameter of the @SequenceGenerator annotation.

I am indeed wondering why it isn't simply incrementing the sequence.nextval by one until it has consumed all values until sequence.nextval + allocationSize...

The reason is two folded:
1/ Why would I want to fall back to such large row ids?
2/ What if some other system is accessing the sequence to insert row in the same table and eventually leads to duplicated values?

Is there actually a good reason to use the HiLo algorithm to implement that feature and not the "simple way"? Am I missing something? And is there a way to provide my own Generator, should I really want to do so?

Thanks,
Alex


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 23, 2007 10:21 am 
Beginner
Beginner

Joined: Thu Dec 16, 2004 11:54 am
Posts: 26
Location: Brussels, Belgium
Wow that's good news:
http://in.relation.to/Bloggers/New323Hi ... Generators

Thanks for the link, Max Rydahl Andersen


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

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.