1 Reply Latest reply on Apr 1, 2002 8:04 PM by Alex Rublin

    EJB2.0 spec dilemma and CMP2.0 in Jboss3.0 beta2

    Alex Rublin Newbie

      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