3 Replies Latest reply on Mar 5, 2003 7:05 PM by cstach

    ON DELETE CASCADE and CMR

    cstach

      I have been searching for a while and I haven't found any information on the dangers or benefits of relying on database constraints over JBoss cascading delete. I'm using MySQL with InnoDB tables and the fk constraints and ON DELETE CASCADE work. Is there a way that I can make sure that JBoss' entity cache, etc. doesn't get poisoned by the database handling the constraints over the CMP conatiner. I don't exactly want to change the commit option to C. Thanks.

        • 1. Re: ON DELETE CASCADE and CMR
          cstach

          I've found that the engine nulls out the CMP fields before it does the delete, so the ON DELETE never gets triggered in the database. I'd really rather have the database handle this and JBoss be aware of it so it clears the cached entities, though.

          • 2. Re: ON DELETE CASCADE and CMR
            cstach

            I've found that the engine nulls out the CMP fields before it does the delete, so the ON DELETE never gets triggered in the database. I'd really rather have the database handle this and JBoss be aware of it so it clears the cached entities, though.

            • 3. Re: ON DELETE CASCADE and CMR
              cstach

              I've found that the engine nulls out the CMP fields before it does the delete, so the ON DELETE never gets triggered in the database. I'd really rather have the database handle this and JBoss be aware of it so it clears the cached entities, though.