Yes, you can do a find in models that are linked by association. So your example $this->Model1->Model2->Model3->find() is valid.
Jeremy Burns Class Outfit [email protected] http://www.classoutfit.com On 17 Feb 2011, at 06:01, [email protected] wrote: > It work. I check directly url to function and returned data. I want > display resault by helper > > function getGroupsList(){ > > App::import('Controller', 'groups'); > > $group = new GroupsController(); > > return $group->groupList(); > > } > In view: > <? echo $show->getUsersList();?> > > I think that is problem and show me error: > Undefined property: GroupController::$Groups [APP/controllers/ > group_controller.php, line 30] > > When i use in another function: > > App::import('Model', "Users"); > > $user = new Users(); > > $this->set('users', $user->find('all') ); > > All is fine but I need associations in future. I know one way to: > $this->Model1->Model2->find(). Is another way to instead of this? > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
