I did exactly that. I read your article on WIKI and found how to use <batch-cascade-delete/>. Without this article I wouldn't even know about <batch-cascade-delete/> DD parameter. (BTW, I tried to do some changes on this article but encountered difficulties to submit it. WIKI editor cripled my response! Something is wrong with this WIKI editor! The preview looked just fine but when I submitted response it was clipled! Take a look.)
You explained how JBoss manages cascade deletion of related records: * destroy relationship; * synchronize the state (set foreign key fields to NULL in the database to be able to remove the parent); * remove the parent instance; * for each child repeat the procedure starting from 1. IMHO this is wrong approach. In big majority of cases you will not be able to destroy relationship regarding database referential integrities. Also, more than often foreign keys are NOT NULL columns. So this listed approach will work only with database models without real integrity constraints implemented in it. Ask DBA's and other people working with DB's what they think about databases without referential integrities! My question is what is the difference if I set <cascade-delete/> or not? As it has been mentioned, I tracked JDBC traffic of JBoss and find out that there's no difference for JBoss if I set <cascade-delete/> or not! JBoss sends the same SQL trying to destroy relationships regardles of <cascade-delete/>. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845502#3845502 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845502 ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user