Iterating a Primary key in using Generators in Hibernate
posted 4 years ago
Can anybody tell me how to initialize the value for a primary key of a Table when we are inserting a row in a table via Hibernate. That is we are using any of the following generator strategy to generate the primary key for a table.
Say for example: My records primary key should start from 1001 value and should iterate when we add the records after that.
EmpId Fname Lname
1001 John Peter
1002 Jerald Rosario
My records should be like the above and should iterate on....