hi,
I have a CMP-entity bean which refers to a table with only 2 fields, and both are
primary key. When I try to call create method, the container outputs the following
error message :
Can not call getPrimaryKey() inside ejbCreate(...) methods, the entity does not have
an identity yet, see the EJB 2.0 specification chapter 10.5.4
java.lang.IllegalStateException: Can not call getPrimaryKey() inside ejbCreate(...)
methods, the entity does not have an identity yet, see the EJB 2.0 specification
chapter 10.5.4
inside the ejbCreate method, i put the following code :
public PaketDetailBranchesPK ejbCreate(PaketDetailBranches objdata) throws
CreateException {
this.setStPacketCd(objdata.getStPacketCd());
this.setStBranchId(objdata.getStBranchId());
return null;
}
it seems to me that both fields must be inserted at the same time, (I know that it can
be done easily using BMP)
can anyone give me hint ?
tha
beN
===========================================================================
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".