I have a few entities in my model which rely on generated Ids. I decided to use TABLE Generation Strategy and provide a common table for generators of all entities. So I put up this code in my mapping file.
Code:
<table-generator name="IdGenerator" table="ID_Generator" allocation-size="50"
pk-column-name="Generator_Name" value-column-name="Generator_Value"
schema="DonorDB"/>
I am facing two issuses now. Firstly, the value-column defaults to Integer, but infact I have some entities whose primary key is Long.
Secondly, The pk-column defaults to VARCHAR(255). I want to reduce the size of this column, say VARCHAR(50).
Can anyone help me in resolving these two issues.
regards,
Nirvan.