Re: Delete, hasOne and dependent

2006-07-25 Thread Rafafa
Hello. I started a similar topic at http://groups.google.com/group/cake-php/browse_thread/thread/5cd53258c2af1959 With a possible fix. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to thi

Re: Delete, hasOne and dependent

2006-07-19 Thread Mike S
I had a similar problem until I remembered that this is a database level issue. When creating your foreign keys you must set the "On Delete" action to "Cascade". This can easily be done using the MySQL administrator application or using SQL when you create the foreign key. More information can

Delete, hasOne and dependent

2006-07-18 Thread Gonçalo Marrafa
Hi. The hasOne association has 'dependent' flag that, if set to true, deletes the associated model when the current one is deleted. The problem is that, normally, the associated model/table will have a foreign key constraint to the model/table being deleted. Since the current model is deleted fir