Hello,
I am using the hilo generator to generate unique identifiers. I'm using it with the default MAX_LO, i.e. 32,767 (Short.MAX_VALUE).
So, when I restart my application, I am throwing away up to 32,767 identifiers. I don't want to waste so many identifiers. To solve it, I was going to change the max_lo value in the mapping files for each of the persistent classes using something like this:
<generator class="hilo">
<param name="max_lo">10</param>
</generator>
But I wonder if there's a better way to change the default max_lo (maybe one that requires to change the value in only one place, instead of changing each one of the mapping files).
Is there a better way?
Thanks in advance.
Xavi
|