Friday, March 6, 2009

@IdClass or @EmbeddedId primary key class

With EJB3 there are two mechanisms for defining composite keys in an enity, both use annotations; the @IdClass and the @EmbeddedId, but which should be used and why?