4 Replies Latest reply on May 10, 2004 9:59 AM by mikejlong

    JBoss setting FK of the many side of a one-to-many relations

    mikejlong Newbie

      I am getting a curious behavior in JBoss that is contrary to what should happen(at least from the perspective of a database programmer). I have a unidirectional relationship from a "many" entity bean to a "one" entity bean that is declared in the "many" entity bean. When I remove the "one" entity bean, JBoss is setting the FK of the "many" entity bean to null Database FK constraints do not behave this way by default. I expected JBoss to disallow the deletion of the "one" entity bean if it was referenced in a "many". I looked in the JBoss docs and could not find any setting for altering this behavior. Can anyone point me in the right direction?