-
Bug
-
Resolution: Done
-
Major
-
JBossAS-3.2.6 Final
-
None
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.