8 Replies Latest reply on Dec 16, 2002 1:43 PM by Jeff Whiteside

    Post create CMR relation problem

    Muneendra Newbie

      hi every one,

      I am back with one more question i am facing one problem with ejbPostcreate my problem goes in this way

      i have two entitys say entity A and entity B

      in Entity A there are two cmp fields,
      say a1 and a2.. aa is Pk for entity A in DB

      in Entity B there are two cmp fields
      say b1 and a2. here a2 is the FK and Its PK in Entity A
      and a2 is not Null field in DB

      there is 1:m CMR relation

      when i am trying to insert using create method like
      ejbCreate(a1,a2){
      setA1(a1);
      }
      ejbPostCreate(b1,a2){
      setA2(a2)(relation)

      }

      i am getting run time error saying that a2 in entity B is not null field . i am thinking since there is a relation between Entity A and B .that relation has to be set in post create method .create method should commit only after executing Poost create method right.same thing works in weblogic

      whats the prob am i missing some silly thing with Jboss.
      I hope u can help me to come out this problem

      Thanx in advance
      Muni