Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1168

batch-cascade-delete problem

XMLWordPrintable

      SourceForge Submitter: kletchatey .
      I have 4 entities:

      Client
      Project
      Order
      OrderLine

      Order has a NOT-NULL foregin key reference to Client.
      Order has a NULL-ABLE foreign key reference to Project.
      OrderLine has NOT-NULL foreign key reference to Order.

      Between Order and Client, Order and Project, OrderLine
      and Order are 1:M relations.

      For OrderLine-Order relation <cascade-delete/> is
      specified in ejb-jar.xml.
      To prevent from UDATING to NULL orderId in OrderLine,
      <batch-cascade-delete/> is specified in jbosscmp-
      jdbc.xml.

      The problem is, that when Order is deleted, an attempt
      is made to UPDATE Order NOT-NULL foreign keys to NULL
      values.
      In case if <batch-cascade-delete/> is not specified this
      problem doesn't appear, but of course problem with
      updating OrderLine orderId field appear.

      Note: This updating is doing only for foreign-keys that
      contains NOT-NULL values.

              olubyans@redhat.com Alexey Loubyansky
              sourceforge-user SourceForge legacy user (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: