3 Replies Latest reply on Apr 30, 2004 1:45 AM by Alexey Loubyansky

    JBoss bug: CMR cascade delete in wrong table order w/ foreig

    yilin Newbie

      I am using JBoss 3.2.3. I have a one-many CMR with cascade delete and the DB table have foreign key constraint. During cascade delete, JBoss seems to issue DB delete statements in the wrong table order - it should delete from the table with fk constraint first.
      Details: I have a "Package" EJB containing many "PackageDocument" EJBs(one-many). The "PackageDocument" DB table has foreign key constraint:
      ALTER TABLE PackageDocument ADD FOREIGN KEY (PackageID) REFERENCES Package

      When deleting a "Package", JBoss is configured to cascade delete all the "PackageDocuments" associated with the "Package". The problem is that JBoss CMP calls DB delete on "Package" table first before deleting the "PackageDocuments" rows, thus violating the DB fk constraint.

      Is this a JBoss bug? How do I report it?