Monday, April 13, 2009

Different ways to define primary key classes in EJB 3.0

When object relational mappings require a primary key to be composed 
of multiple persistent properties (i.e. composite key ) the JPA provides 
following two ways of mapping :
1) @javax.persistence.IdClass annotation
2) @javax.persistence.EmbeddedId annotation
  in conjection with @javax.persistence.Embeddable annotation


Post a Comment