-->
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: Another HiLo generator question
PostPosted: Thu Nov 13, 2003 3:36 am 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
Actually, the question's probably more about id generators in general.

If I have two mapped classes, and they both have TableHiLoGenerator defined as the key generator, then I'm actually going to get two instances of TableHiLoGenerator aren't I? One will be used to generate keys for the first entity and the other will be used to generate keys for the second entity, yes?

Is there any way of sharing the generators between classes? That is, have one generator instance for both mapped classes?

Any differences in this functionality between 2.0 and 2.1?

If I was crazy enough to want this kind of behaviour, I'd have to write a custom generator class wouldn't I?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 13, 2003 9:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I can't imagine why you would want this. You can certainly have them share the same database table, which is all that should matter.


Otherwise - yes, you would have to write one (which is trivial).


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.