Hi,
I have USER table where user_id is identity and auto generated i.e. increment by 1 for each new record. I have a TRANSACTION table where each user_id will have its transaction_id.
I plan to configure transaction_id as auto increment for each user for example
user_id 1 make a new transaction first time, transaction_id value should be 1 for another transaction from the same user should generate transaction_id value as 2 and so on...
But in between if user_id 2 make a new transaction first time, transaction_id value should be 1 and so on.
That is for each user, it should be different sequence to auto generate.
Can you please suggest how to handle it using Hibernate?
Many thanks,
|