You should try using associations (hasMany, belongTo,...) Regards,
-- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net On Wed, Feb 13, 2008 at 6:44 PM, Viktor Nagy <[EMAIL PROTECTED]> wrote: > > Hi, > > I am working on an application to analyse my installed applications > usage (it's based on popularity contest from debian). The script is > command line. All the "modules" (tasks in cake) work fine when I test > them separately, but they fail to work in a "real" situation. The > problem is the following: > > I have two tasks. Let's call them Task and SubTask > > Task contains: > var $tasks = array('SubTask'); > var $uses = array('MyModel'); > > SubTask contains: > var $uses = array('SubModel'); // this is different from MyModel > > If I call SubTask directly at the cli, then everything works fine. > SubModel is created and binded. > > On the other hand if I call SubTask from Task with something like > $this->SubTask->execute() > then SubModel does not exist inside SubTask. How can I reach SubModel > inside SubTask? > > Both tasks are included in the main shell as well. > > Thanks for your help! > V > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---