Hi all,
I have an entity bean where in the combination of two field works as a primary key.
I have written an access bean for the bean using VAJ.
Now whenever I am trying to use the access bean from my client program I am getting an exception which says the the objected that should be passed to the findByPrimaryKey method is not found.
However I have tested one more entity bean where, only one field is the primary key and it is working fine.
Does anybody have any idea, why the client program fails whenever the access bean uses an entity bean with composit key?
Your response will be appriciated.
-
access bean for an entity bean with composit key (3 messages)
- Posted by: prabin mahapatra
- Posted on: June 07 2001 08:52 EDT
Threaded Messages (3)
- access bean for an entity bean with composit key by Subbu Vedula on June 07 2001 11:05 EDT
- access bean for an entity bean with composit key by prabin mahapatra on June 08 2001 00:04 EDT
- access bean for an entity bean with composit key by Paul Watson on June 08 2001 09:13 EDT
- access bean for an entity bean with composit key by prabin mahapatra on June 08 2001 00:04 EDT
-
access bean for an entity bean with composit key[ Go to top ]
- Posted by: Subbu Vedula
- Posted on: June 07 2001 11:05 EDT
- in response to prabin mahapatra
Have you written a Primary Key class that properly implements hashcode and equals methods? That Primary Key class should contain these two primary keys as members. -
access bean for an entity bean with composit key[ Go to top ]
- Posted by: prabin mahapatra
- Posted on: June 08 2001 00:04 EDT
- in response to Subbu Vedula
Yes, I have the primary key class and those two methods are also there. I had used VAJ for writting the entity bean and access bean. So every thing has been generated automatically.
Any idea what could be the problem? -
access bean for an entity bean with composit key[ Go to top ]
- Posted by: Paul Watson
- Posted on: June 08 2001 09:13 EDT
- in response to prabin mahapatra
Hi,
Stupid questions:
- is the row you are looking for in the db?
- are you sure that no duplicate rows exist with the same keys?
- if one field is a date, are you sure that the format is correct?
...