Hello,,
I'd like to delete many record inside many tables.
I used $belongsTo in my Model. And in my Controller, I write this.
###
$this-Visit-deleteAll(array(
'Visit.id' = $id,
'History.visit_id' = $id,
I haven't used deleteAll, but according to the guide
(http://book.cakephp.org/view/1038/deleteAll) your conditions need to be in SQL
format, not Cake array format.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 9 May 2011, at 10:52, thom wrote:
Hello,,
i think u r not giving the relation of associate model
take this example to reffer
$this-PatientClinicalDetail-PatientClinicalDetailChemotherapy-
deleteAll(array('PatientClinicalDetailChemotherapy.patient_clinical_detail_id'
= $this-data['PatientClinicalDetail']['id']));
here code indicates