Hi eg344,
I am using the mapping something like this:
<id name="id" type="long" column="uid" unsaved-value="0">
<generator class="increment">
</generator>
</id>
The generator here is "increment".
In the hibernate reference manual there are other generators as you talked about...
increment
generates identifiers of type long, short or int that are unique only when no other process is inserting data into the same table. Do not use in a cluster.
identity
supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. The returned identifier is of type long, short or int.
sequence
uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase. The returned identifier is of type long, short or int
Its a clear interpretation that increment is ruled out and also as i am using MYSQL so i need to use "identity" as the generator.
But its not clear if it will solve the problem... I need to test it first....
Can you add more to it.....
Thanks for the help.
|