3 Replies Latest reply on Aug 29, 2002 11:43 AM by dsundstrom

    Relation persistence

    traxxoo

      I use JBoss 3.0.0 with mySql.
      When in my code I change a relation between two objects, sometimes (i can't reproduce the case) in the database, I found a NULL. The persistence in the DB is not right, so when I load the object I have an error. It seems to be a bug in the JBoss persistence module, isnt'it ? Do you think, it's better with the 3.0.1 or 3.0.2 releases ?

      Thanks

        • 1. Re: Relation persistence
          dsundstrom

          I don't understand your question. If you think you found a bug, write a small test case and post it at source forge.

          Use the 3.0.2 release.

          • 2. Re: Relation persistence
            traxxoo

            I have 3 entities :
            - popup (the code below is in this bean)
            - body
            - publishedBody

            My code:
            SimplePopupBody body = getBody();
            SimplePopupBody publishedBody = getPublishedPopup();

            setPublishedPopup( body );

            if (publishedBody != null)
            {
            try
            {
            publishedBody.remove();
            }
            catch(RemoveException re)
            {
            throw new clicktocontact.application.LoggableEJBException( re );
            }
            }

            Sometimes, when I execute this code after the persistence the relations are set to null :
            getBody() returns null
            getPublishedPopup() returns null

            Thanks for your help

            • 3. Re: Relation persistence
              dsundstrom

              Sometimes they are null... and why are they not allowed to be null?