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?
|