0 Replies Latest reply on Jul 26, 2002 3:51 AM by giluka

    JBoss 3.0 and Relationship Problem

    giluka

      Hi,
      i've declared a relationship (writing right tags for that in deployment files) between two entity beans A and B.
      A points to one instance of B, like relation between Person, A, and Title
      (Mr., ...), B.
      In creating an A instance, when i try to insert a reference to a non
      existent instance of B the behaviour of container is to deny this action:
      constraint is violated. So, according to theory of constraint create
      automatically between the two tables.
      But, when i try to remove an entity of B that have referenced from one or
      many entities of A there's a problem...
      JBoss does not generate an exception (contraint violated) as i expect, but
      remove B entity specified and update all reference to this entity in all
      tables related with null value.

      My question is:
      1) JBoss problem ?
      2) how to manage situations like this ?

      Thanks !