7 Replies Latest reply on Aug 29, 2002 11:32 AM by Dain Sundstrom

    Setting a CMR field seems to insert a null into the FK field

    Sakkie Larney Newbie

      Hi,

      I'm using JBoss 3.0 final with the default hypersonic db, and am trying trying to deploy a few beans with CMR. The two beans in question are a forum bean and a posting bean, with a one-to-many relationship between the two.

      Have set up the relationships in ejb-jar, and tables are created correctly. Calling setForum() on the posting bean succeeds, and calling getForum() on that same bean straight after the setForum() and then using one of the forum methods on the returned local interface also works as expected.

      The snag is that even though the association seems to be correctly made in the container, it inserts a null value into the foreign key column of the posting table. Have tried everything (short of bashing my PC with a hammer) and nothing has helped. Why is this happening?

      Sakkie