How can I reset (force) the ID generation to be started from 1 per each table? currently I am using the <generator class="native"> element for each object id mapping. but when it comes to DB insertion the ID keep incremented uniquely per all tables. can I make it unique only per each table..
e.g
if I inserted 3 customer objects (into customer table) then inserted 3 order object (into order table)
Customer table
-----------------
customer_id (will take the following values) ---> 1,2,3
order table
-------------
Order_id (will take the following values) ---> 4,5,6
What I need to do is to make the order_id takes values of 1,2,3 so the ID will be unique per table.
Appreciate your help,
|