2 Replies Latest reply on Mar 9, 2005 8:19 PM by Paul Walker

    FKs must be allow null ???

    Leandro Terra Melo Newbie

      i cannot insert a data in one table because it's FK doesn't allow null and i only set the FKs in ejbPostCreate(), as it should be.

      So, do i have to make all my FKs allow null or there's other solution?


        • 1. Re: FKs must be allow null ???
          Marek Neumann Novice

          see 'insert-after-ejb-post-create' in jboss.xml, IMHO since 3.2.2.


          • 2. Re: FKs must be allow null ???
            Paul Walker Newbie

            I changed the standardjboss.xml file to read the following:


            <container-name>Standard CMP 2.x EntityBean</container-name>

            I tried doing this within my own JBOSS.XML file using the following. . .

            <container-configuration extends="Standard CMP 2.x EntityBean">
            <container-name>INSERT after ejbPostCreate Container</container-name>

            . . . but this did not seem to work. Changing the standart Jboss XML file worked great.