Are you sure?

I know it works in Controller, to use another model,
But I want to query a model from inside another model.

N.B. I've tested $uses in model and it doesn't work.


> you can use : $uses variable for include another model in your current
> model.
>
>
> $uses = array('modelnameA','modelnameB');
>
>
>
>
> 2009/5/11 Faza <f...@ansi.pl>
>
>>
>> Hi all,
>>
>> I've run into a weird problem.
>>
>> I have two models, not directly related, but I need data from model A to
>> modify model B find results using ModelB::afterFind();
>>
>> In model B, i use this:
>>
>> $myModelA = ClassRegistry::init('ModelA');
>>
>> this returns no error.
>>
>> but when I do
>> $values = $myModelA->findById($valid_id_from_somewhere)
>>
>> CakePHP fails to load page, but shows no errors.
>>
>> Anybody have a clue?
>>
>> thanks in advance...
>> --
>> Jacek
>>
>>
>> >
>>
>
>
> --
> Regards,
> Mohammad Arif Hossen
> Junior Web Developer
> United Group International(UGIBD)
> Mobile: +88 01714355911
>
> >
>


-- 
Jacek


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

Reply via email to