Using generator with composite keys in hibernate
posted 6 years ago
Basically you define a generator to use and Hibernate will pick up a value for a primary key from that. In your case you have a sequence to use, so the generator will just get the next value form there. Have a read of the documentation for a fairly detailed explanation.