Is possible to have a Composite Primary Key which components are entity foreign keys?
I have the following model: (…) @IdClass(BetID.class) //Primary Key, composite = userID+gameID public class Bet { (…) //Primary Key @ManyToOne @Id private User user; //Composite key:userID @ManyToOne @Id private Game game; //Composite key:gameID In which, of course, has the following Composite key: public class BetID implements Serializable { @OneToOne private User user; @OneToOne private Game… Read More Is possible to have a Composite Primary Key which components are entity foreign keys?