1 Reply Latest reply on Mar 6, 2004 10:34 PM by Alexey Loubyansky

    problem with <cascade-delete/> when <sync-on-commit-only>tru

    Milen Dyankov Newbie

      In our application we have about 20 CMP 2.0 beans! There are lots of relations 1:1, 1:N set! For most 1:N relations we have <cascade-delete/>! It was all working just fine until we decided to optimize for speed and set globally for JBoss:

      <sync-on-commit-only>true</sync-on-commit-only>

      Now we are not able do delete any bean participating in relation even though the relation is marked as <cascade-delete/>! When we try to delete such CMP an JDBC Exception is thrown stating violation of foreign key constraint.

      Why setting "sync-on-commit-only" to "true" changes the order in which CMPs are deleted? Is this a bug or normal behavior?