Understanding Composite-id with JPA Identifiers @Id Vs @EmbeddedId Vs @IdClass
Sunday, May 11th, 2008Note - If you're looking for Hibernate Composite-Id example using xml configuration, read our earlier post here. Entities must define an id field. Typically a generated id is fine for most cases, but sometimes we need to add multiple fields corresponding to the database primary key. (legacy database?). The id can ...