Thanks for the reply,
I've misunderstood the concept of model, which is only the schema layer.
I wanted the model to act as controller...
After reviewing the relations, I've added some containable and now I
have acheived the result the proper MVC way.
Flipflops pisze:
> Hi Faza
>
> I don't th
Hi Faza
I don't think it is a problem with using ClassRegistry::init inside
another model as do exactly what you are trying to do quite a lot.
(e.g. $link_data = ClassRegistry::init('Link')->get_shared_links();)
Perhaps it is something to do with afterFind() ?
John
On May 11, 12:27 pm, "Faza"
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','mod
you can use : $uses variable for include another model in your current
model.
$uses = array('modelnameA','modelnameB');
2009/5/11 Faza
>
> 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 us
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->