how to make a composite primary key (java persistence annotation)
You’ve already had a few good answers here on how to do exactly as you ask.. For reference let me just mention the recommended way to do this in Hibernate instead, which is to use a surrogate key as primary key, and to mark business keys as NaturalId’s: Although we recommend the use of surrogate … Read more