From the spec:
The entity Bean Provider must not attempt to modify the values of cmr-fields in an ejbCreate< METHOD(...) method; this should be done in the ejbPostCreate<METHOD(...) method instead.
This cause the problem to implement relationship with FK that has "NOT NULL" constraint. We cannot call setFk(..) in ejbCreate(Pk, Fk) because of spec.
However it is too late to call setFk(..) in ejbPostCreate(..) because first insert have called already before ejbPostCreate.
How to solve this problem?
Any help would be appreciated
I am wondering if somebody had the same issue - necessity having NOT NULL constraint on Foreign Key and how he resolved it with CMP2 and JBOSS 3.0 beta2.