Friday, January 11, 2013

Re: Delete related data

Question model:

public $hasMany = array(
'Option' => array(
...
'dependent' => true
)
);

On Fri, Jan 11, 2013 at 4:03 AM, amitsukapure <amit.sukapure89@gmail.com> wrote:
> Hi,
> I have tried but still not working.
> My situation,
> Question hasMany Option
>
> Tables,
> questions {id,question,answer}
> options{id,option,question_id}
>
> In QuestionsController , in delete menthod,
> $this->Question->delete($id,true);
>
> Everything works fine about association but not deletion.
> Help me out.
> Thanks
>
>
>
> --
> View this message in context: http://cakephp.1045679.n5.nabble.com/Delete-related-data-tp1318091p5713148.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.

No comments: