> -----Original Message----- > From: Maya Menon [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 03, 2002 8:51 AM > To: [EMAIL PROTECTED] > Subject: EJB ( CMP) and Primary Keys > > I have to create a CMP for a table with no primary key but which has > a foreign key. Has any one done this ? I am using Websphere and > WSAD.. > If anyone has done this ... can someone help me. I am confused in > creating an EJB for a table with NO primary key.. > > I got an answer from a group saying , create a pseudo pK, But > I am not sure how to do that..
I have a feeling you're dealing with an EXISTING table, and you have to map that to a CMP entity EJB. Any suggestions about creating opaque primary key values probably won't help you here. This table really does NOT have a primary key? I have a feeling you might need to map this to an EJB session bean and have it do the work. I don't see how to define an EJB entity that does not have a primary key. =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
