-->
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.  [ 5 posts ] 
Author Message
 Post subject: HiLo algorithm
PostPosted: Tue Feb 03, 2004 12:35 pm 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
I've been trying out the HiLo algorithm for generating my ids and I see a problem on the horizon if I use MySQL. Because the HiLo algorithm uses one column per required id ( therefore per table ) if I have more than 255 tables that require generated ids the hilo table will not work because of MySQLs limit of 255 columns per table.

The options I see to avoid this are:

Use the HiLo system for now and create a second generator table should my table count get > 255.

or

Write my own generator class to have one row per generated table rather than one column?

Is there a more straightforward solution I am missing or a way of making the current HiLo implementation do the second option?

Cheers.

Myk.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2004 1:03 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
? HiLo just uses one column for all tables.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2004 6:25 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
gloeglm wrote:
? HiLo just uses one column for all tables.


Unless you want to have different id series per persistent entity ;-)

Have a look to http://forum.hibernate.org/viewtopic.php?t=927541... This is probably what you are looking for. Unfortunately, I haven't received any answer from Gavin yet :-(


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2004 6:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
brenuart wrote:
Unless you want to have different id series per persistent entity ;-)


Who would ever want that ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 5:24 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
gloeglm wrote:
Who would ever want that ;-)


Heu... me :-(
I've been thinking about it ;-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.