How do I create a composite primary key in hibernate within the hbm.xml file
问题 I have the following three simple classes. How do I go about mapping the Rating class and more specifically its composite key in my Rating.hbm.xml file? I'm currently getting quite lost in the hibernate documentation (5.1.2.1. Composite identifiers) Each rating can have one book and one user making that specific rating. Each user can make many ratings. Each book can have many ratings. Classes Rating class public class Rating { private User user; private Book book; private int rating; private