-
1. Re: Composite key -CMP Bean
yantriki Aug 10, 2004 5:38 PM (in response to anilpopnet)Hi anil,
Did you find the solution to your composite key problem. I am also having the same problem. I however can write records to table, but it crashes on me whenever I try to read the record.
I struggled with it for a while before I realized it's the composite key problem. I was for a long time looking for datetime part of my composite key.
I have the Composite Key class defined (it also implements Serializable interface) and overwrites hashCode and equals methods.
regards
vss -
2. Re: Composite key -CMP Bean
aloubyansky Aug 12, 2004 7:31 AM (in response to anilpopnet)Make sure you have a proper implement for hashCode and equals?
-
3. Re: Composite key -CMP Bean
sbrbot Aug 18, 2004 5:52 PM (in response to anilpopnet)In composite key class one must have exactly the same names of getters/setters as defined in EJB using this composite PK class. So if your SomeEJB has getId1 and getId2 methods which are mapped on PK fields, then your SomePK must have exactly the same getId1 and getId2 methods!