1 Reply Latest reply on Apr 3, 2004 6:37 AM by aloubyansky

    FK Constraints not recognized by JBOSS.

    ebrain13

      Hi,

      I have a deployment environment of JBOSS - DB2 in which have deployed an application using EJB CMP 2.0.

      I have also defined foreign key constraints on database.

      Say for example I have an Entity A which is being referenced by B. So on deletion of A i should get Referential Intergrity violation as B is referencing A.

      If i try to delete the entity A using Db2 client, it gives me the referential integrity violation.

      But when i try to delete A invoking the remove() method using the EJB, JBOSS first nulls out the reference of A in entity B and then deletes it and as a result I dont get the Referential Integrity Error from database.

      Please throw some light on what to configure in JBOSS from stopping it to nullify the reference of A in B when remove() method is invoked.

      - Vikram.

        • 1. Re: FK Constraints not recognized by JBOSS.
          aloubyansky

           

          "ebrain13" wrote:
          So on deletion of A i should get Referential Intergrity violation as B is referencing A.


          First of all, it is not a bug (or point me to the spec paragraph that states that). But some users are confused with this. I would agree with config option for this case. You can submit a feature request.

          "ebrain13" wrote:
          Please throw some light on what to configure in JBOSS from stopping it to nullify the reference of A in B when remove() method is invoked.


          No such an option at the moment.