ajse wrote:
Hi all,
I want to write my own generator class which will produce unique string values every time a new record is inserted.Can anybody help me in this aspect.Currently I am doing this.
<id
name="hibid"
type="int"
column="id"
>
<generator class="increment" />
</id>
But i want to change the column type from int to String.
With regards,
Ajse
You're not going to get much help here if you don't try it yourself first.
Read the documentation on the various built-in generators. Then look at the code for each of them. It's really a trivial task if you just take a few minutes to look at it.