This content has been marked as final.
Show 1 reply
-
1. Re: Composite and Overlapping PK
cyril.joui May 25, 2006 1:05 PM (in response to prabhumadanagopal)Why do you use the primaryKey property ?
You can do this :@IdClass(com.x.ejb.entity.impl.UserGroupKey.class) @Entity public class UserGroup { ... @Id @Column(name="GROUPID", insertable=false, updatable=false) public String getGroupId() { return groupId; } ... @Id @Column(name="USERID", insertable=false, updatable=false) public String getUserId() { return userId; } ... // don't use this /*********************************** @EmbeddedId public UserGroupKey getPrimaryKey() { return primaryKey; } ***********************************/