Idclass मान Entity 'SaleDetails' का समान वर्ग नहीं होना चाहिए
@Entity
@IdClass(PK.class)
public static class SystemUser{
@Id
private String subsystem;
@Id
private String username;
public PK getId(){
return new PK(subsystem, username);
}
public void setId(PK id){
this.subsystem = id.subsystem;
this.username = id.username;
}
}
public static class PK implements Serializable {
private String subsystem;
private String username;
public PK(String subsystem, String username) {
this.subsystem = subsystem;
this.username = username;
}
}