This content has been marked as final.
Show 1 reply
-
1. Re: CMR - ejbPostCreate - SQL not null Error
mlange Jul 9, 2003 6:03 AM (in response to userid)Either you set your database to do deferred constraints, so that constraint are only checked at commit time (Oracle) or implement workaround by declaring <cmp-fields> for the foreign keys and setting the <cmp-fields> in ejbCreate():
public Long ejbCreate(
...
MessageLocal messageFk)
throws CreateException, EJBException, SQLException
{
...
setMessageFk(messageFk.getMessageId());
...
}
...
public abstract void setMessageFk(Long messageFk);
--> The spec forbids to set cmr fields in ejbCreate().