Hi

Yes, it is almost total nonsense, IMHO, because you shouldn't need to
go through controllers to pass data from one model to another...
Accessing to a model from another associated model is done like that:
$other_model_data = $this->OtherModel->getValues($othermodelid); //
"$this" reprensents your Hotel model
If your other model is not already associated, you can add it to the
$uses property of your first model to access it:
var $uses = array("AssociedModel1","AssociedModel2","OtherModel");

++++++
Clément

On Mon, Oct 6, 2008 at 12:15 PM, Liebermann, Anja Carolin
<[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a method in a model and want to read values from another model in
> a method.
>
> Model: Hotel
>
> function getanothermodelsvaules($othermodelid){
>        //some code
>        $othermodel =
> $this->requestAction($this->othermodels/getMyValues/'.$othermodelid);
>        //some more code
> }
>
> Question: Is this complete nonsense? Can / Should I do it this way?
>
> Thank you
> Anja
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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