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 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" <[email protected]> wrote:
>
>> 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
>>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---