If you just want to destory the model you can do this:

$this->Relationship->__destruct();
unset($this->Relationship)

Why you are using loadmodel for both parent and relationship  instead
of $this->Parent->Relationship is beyond me

On Dec 14, 1:17 pm, Miles J <[email protected]> wrote:
> The student() method is not being called since it is another action.
>
> Secondly, why should it be disabled? Another object isn't going to
> slow down your application.
>
> On Dec 14, 3:51 am, Amit Badkas <[email protected]> wrote:
>
> > Hi,
>
> > Please elaborate what you want to do as from the given code, it's not clear
> > enough. Also why your controller starts from tests_controller(){...?
>
> > Amit Badkas
>
> > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > On Tue, Dec 14, 2010 at 2:35 PM, Smile <[email protected]> wrote:
> > > HI Friends,
>
> > > Can any of you please let me know how to disble  previously loaded
> > > model ??
>
> > > I am describing my doubt through an example below.
>
> > > EX:
>
> > >     I Am using a controller ,
>
> > >          test_contoller(){
>
> > >              //here 2 functions am using
>
> > >              function student(){
>
> > >                 $this->loadmodel('student');
> > >              }
>
> > >             function parent(){
>
> > >                $this->loadmodel('parent'); //loads the parent model
>
> > >                $this->loadmodel('relationship'); //loads the
> > > relationship model
>
> > >             }
> > >      }
>
> > > Once my execution picks  up parent function that time , previously
> > > loaded model "student" in student function should be disabled.
>
> > > Thanks in advance.
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
> > > with their CakePHP related questions.
>
> > > 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]<cake-php%[email protected]>For
> > >  more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to