Silly mistake-

check spelling of dependent in has many.

On Sat, Jan 12, 2013 at 9:58 AM, <[email protected]> wrote:

> Hello Everyone,
>
> I need to delete associated records.
>
> I have tried but can't figure it out.
>
> Here is my situation,
>
> Database,
>
> questions {id(pk), question, answer}
>
> options {id(pk), question_id, option_value}
>
> Models,
>
> Question
>
> ..
>
> public $hasMany = array( 'Option' => array('dependant' => true));
>
> ..
>
> Option
>
> ..
>
> public $belongsTo = array( 'Question' );
>
> ..
>
> Controllers,
>
> QuestionController
>
> ..
>
> public function delete($id = null){
>
> $this->Question->delete($id,true)
>
> }
>
> ..
>
> Still its not working with deletion. Otherwise everything works fine about
> association.
>
> Please Help Me.
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>



-- 
Chetan Varshney
Ektanjali Softwares Pvt Ltd

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to