|
 |
enterprise_java_beans thread: Re: enterprise_java_beans digest: June 11, 2002
Message #1 by Maxim Kurganetsky <maxim-sub@m...> on Fri, 14 Jun 2002 11:11:47 +0300
|
|
Hello there,
Could anyone help me with custom primary keys in CMP beans?
I created class EmployeePK with two public members: id and
companyName and I want to find an employee using something like:
EmployeePK employeePK = new EmployeePK();
employeePK.id = id;
employeePK.companyName = this.name;
..... and then:
employeeHome.findByPrimaryKey(employeePK);
The question is: how will the container store my primary key in the
database? What should I write in the EmployeeBean class to store the PK as
two database fields: ID and CompanyName?
Thank you very much in advance.
P.S. EJB 1.1. jBoss AS
|
|
 |