Developers, Developers, Developers! Maksim Sorokin IT Blog

26Mar/100

Compound Key In JPA

Sometimes one needs a compound key for specifying @Entity. TopLink website says that one should provide multiple @Id and @IdClass for a composite primary key. But it actually works without specifing @IdClass too.