Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Delete with Cascade
Re: Delete with Cascade [message #2633 is a reply to message #2632] Wed, 24 November 2010 13:57 Go to previous message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
Yes. Each child record is read individually so that the deleteRecord() method can be called to deal with any grandchildren (and great-grandchildren, et cetera). If you have audit logging turned on then eah deleted record is also written to the log file.

If you want to turn logging off for deletes you can set $this->audit_logging to FALSE in the _cm_pre_deleteRecord() method an back to TRUE in the _cm_post_deleteRecord() method.

If you want to delete all children and ignore the possibilty of grandchildren you can insert code in the _cm_pre_deleteRecord() method to cycle through the array of child tables and perform a deleteSelection() on each one. This will then delete any child records on that table without having to read them first.


 
Read Message
Read Message
Previous Topic: add another action button to enquire form
Next Topic: grandparent - parent - child link entity
Goto Forum:
  


Current Time: Fri Nov 22 09:27:33 EST 2024

Total time taken to generate the page: 0.00939 seconds